/**
 * KB Price Alert - Frontend Styles
 */

/* Price Alert Block */
.kbpa-price-alert-block {
    margin: 15px 0;
}

.kbpa-trigger-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s ease;
}

.kbpa-trigger-link:hover {
    background: #25b9d7;
    border-color: #25b9d7;
    color: #fff;
    text-decoration: none;
}

.kbpa-trigger-link i {
    font-size: 18px;
}

/* Modal Overlay */
.kbpa-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

.kbpa-modal.active {
    display: block;
}

.kbpa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
}

/* Modal Content */
.kbpa-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 450px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.kbpa-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    line-height: 1;
    z-index: 1;
}

.kbpa-modal-close:hover {
    color: #333;
}

/* Modal Header */
.kbpa-modal-header {
    padding: 20px 25px;
    background: linear-gradient(135deg, #25b9d7 0%, #1a8fa8 100%);
    color: #fff;
}

.kbpa-modal-header h4 {
    margin: 0 0 5px 0;
    font-size: 20px;
    font-weight: 600;
}

.kbpa-product-name {
    margin: 0;
    font-size: 14px;
    opacity: 0.9;
}

/* Modal Body */
.kbpa-modal-body {
    padding: 25px;
}

.kbpa-current-price {
    text-align: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

.kbpa-price-label {
    display: block;
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.kbpa-price-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Form Groups */
.kbpa-form-group {
    margin-bottom: 18px;
}

.kbpa-form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.kbpa-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.kbpa-input:focus {
    outline: none;
    border-color: #25b9d7;
}

/* Price Options */
.kbpa-price-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.kbpa-price-option {
    flex: 0 0 calc(33.333% - 6px);
    margin: 0;
    cursor: pointer;
}

.kbpa-price-option input {
    display: none;
}

.kbpa-option-label {
    display: block;
    padding: 10px 8px;
    text-align: center;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.kbpa-price-option input:checked + .kbpa-option-label {
    border-color: #25b9d7;
    background: #e8f8fb;
}

.kbpa-price-option:hover .kbpa-option-label {
    border-color: #25b9d7;
}

.kbpa-discount {
    display: block;
    font-size: 16px;
    font-weight: 700;
    color: #e74c3c;
}

.kbpa-option-price {
    display: block;
    font-size: 12px;
    color: #666;
    margin-top: 2px;
}

.kbpa-custom-option {
    flex: 0 0 100%;
}

.kbpa-custom-price-input {
    margin-top: 10px;
}

/* Privacy Checkbox */
.kbpa-privacy {
    margin-top: 15px;
}

.kbpa-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.kbpa-checkbox-label input {
    margin-top: 3px;
}

.kbpa-checkbox-label a {
    color: #25b9d7;
}

/* Form Actions */
.kbpa-form-actions {
    margin-top: 20px;
    text-align: center;
}

.kbpa-submit-btn {
    width: 100%;
    padding: 12px 20px;
    background: #25b9d7;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.kbpa-submit-btn:hover {
    background: #1a8fa8;
}

.kbpa-remove-btn {
    margin-top: 10px;
    color: #e74c3c;
    font-size: 13px;
}

.kbpa-remove-btn:hover {
    color: #c0392b;
}

/* Message Display */
.kbpa-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 4px;
    text-align: center;
    font-size: 14px;
}

.kbpa-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.kbpa-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Existing Alert Info */
.kbpa-existing-alert-info {
    margin-bottom: 15px;
}

.kbpa-existing-alert-info .alert {
    margin: 0;
    padding: 12px 15px;
    font-size: 13px;
}

/* Loading State */
.kbpa-form.loading .kbpa-submit-btn {
    opacity: 0.7;
    pointer-events: none;
}

.kbpa-form.loading .kbpa-submit-btn:after {
    content: '...';
}

/* Body with modal open */
body.kbpa-modal-open {
    overflow: hidden;
}

/* Responsive */
@media (max-width: 480px) {
    .kbpa-modal-content {
        width: 95%;
    }

    .kbpa-price-option {
        flex: 0 0 calc(50% - 4px);
    }

    .kbpa-modal-body {
        padding: 20px;
    }
}
