/* =================================
   DISCOUNT MODAL STYLES
   ================================= */

/* Modal Overlay */
.discount-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.discount-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 0;
}

/* Modal Content */
.discount-modal-content {
    background-color: white;
    width: 460px;
    max-width: 90vw;
    max-height: 85vh;
    padding: 25px 30px 20px 30px;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideIn 0.3s ease;
}

/* Close Button */
.discount-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.discount-close:hover,
.discount-close:focus {
    color: #333;
}

/* Header */
.discount-modal-content h2 {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 700;
    color: #2F61AB;
    text-align: center;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    font-size: 13px;
    margin: 0 0 16px 0;
    line-height: 1.3;
}

/* Form Styles */
.discount-form {
    margin-bottom: 14px;
}

.form-group {
    margin-bottom: 11px;
}

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

.form-group input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #50BED0;
}

.form-group input::placeholder {
    color: #999;
}

/* Radio Group for Hogar/Empresa - Compact Style */
.radio-group {
    display: flex;
    gap: 20px;
    align-items: center;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    transition: color 0.2s;
}

.radio-label:hover {
    color: #50BED0;
}

.radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    margin: 0;
    accent-color: #50BED0;
}

/* Primary Button */
.primary-btn {
    width: 100%;
    padding: 13px 20px;
    background: linear-gradient(135deg, #50BED0, #2F61AB);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(80, 190, 208, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(80, 190, 208, 0.4);
}

.primary-btn:active {
    transform: translateY(0);
}

/* Modal Divider */
.modal-divider {
    text-align: center;
    margin: 12px 0 10px 0;
    position: relative;
}

.modal-divider::before,
.modal-divider::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 35%;
    height: 1px;
    background-color: #e0e0e0;
}

.modal-divider::before {
    left: 0;
}

.modal-divider::after {
    right: 0;
}

.modal-divider span {
    background-color: white;
    padding: 0 15px;
    color: #999;
    font-size: 14px;
}

/* Contact Buttons */
.contact-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.whatsapp-btn,
.call-btn {
    flex: 1;
    padding: 10px 14px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.whatsapp-btn img,
.call-btn img {
    width: 20px;
    height: 20px;
}

.whatsapp-btn {
    background-color: #25D366;
    color: white;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.whatsapp-btn:hover {
    background-color: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
}

.call-btn {
    background-color: #007AFF;
    color: white;
    box-shadow: 0 4px 12px rgba(0, 122, 255, 0.3);
}

.call-btn:hover {
    background-color: #0066dd;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 122, 255, 0.4);
}

.whatsapp-btn:disabled,
.call-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Skip Link */
.skip-link {
    display: block;
    text-align: center;
    color: #999;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s;
    margin-top: 6px;
    font-weight: 500;
}

.skip-link:hover {
    color: #666;
    text-decoration: underline;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* =================================
   TABLET RESPONSIVE (768px - 480px)
   ================================= */

@media (max-width: 768px) {
    .discount-modal-content {
        width: 85vw;
        padding: 30px;
    }

    .discount-modal-content h2 {
        font-size: 24px;
    }

    .modal-subtitle {
        font-size: 15px;
    }

    .primary-btn {
        font-size: 17px;
        padding: 14px 20px;
    }
}

/* =================================
   MOBILE RESPONSIVE (<480px)
   ================================= */

@media (max-width: 480px) {
    .discount-modal.show {
        align-items: flex-start;
        padding: 10px 0;
    }

    .discount-modal-content {
        width: 90vw;
        max-height: none;
        overflow-y: visible;
        padding: 14px 14px 12px 14px;
        border-radius: 10px;
        margin: auto;
    }

    .discount-close {
        right: 10px;
        top: 10px;
        font-size: 20px;
    }

    .discount-modal-content h2 {
        font-size: 17px;
        margin: 0 28px 5px 0; /* Space for close button */
    }

    /* Show subtitle on mobile */
    .modal-subtitle {
        font-size: 12px;
        margin: 0 0 8px 0;
        line-height: 1.3;
    }

    /* Make form more compact */
    .discount-form {
        margin-bottom: 8px;
    }

    .form-group {
        margin-bottom: 7px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .form-group input {
        min-height: 38px;
        font-size: 15px;
        padding: 6px 8px;
    }

    /* Radio buttons more compact */
    .radio-group {
        gap: 15px;
    }

    .radio-label {
        font-size: 13px;
        gap: 6px;
    }

    .radio-label input[type="radio"] {
        width: 16px;
        height: 16px;
    }

    /* Compact button */
    .primary-btn {
        font-size: 14px;
        padding: 10px 16px;
        min-height: 40px;
    }

    /* Compact divider */
    .modal-divider {
        margin: 8px 0 6px 0;
    }

    .modal-divider span {
        font-size: 11px;
        padding: 0 8px;
    }

    /* Stack contact buttons but keep compact */
    .contact-buttons {
        flex-direction: column;
        gap: 6px;
        margin-bottom: 8px;
    }

    .whatsapp-btn,
    .call-btn {
        width: 100%;
        min-height: 40px;
        padding: 8px 12px;
        font-size: 13px;
    }

    .whatsapp-btn img,
    .call-btn img {
        width: 18px;
        height: 18px;
    }

    .skip-link {
        font-size: 11px;
        padding: 6px;
        margin-top: 2px;
    }
}

/* Very small screens */
@media (max-width: 360px) {
    .discount-modal.show {
        align-items: flex-start;
        padding: 5px 0;
    }

    .discount-modal-content {
        padding: 10px 10px 8px 10px;
        max-height: none;
        margin: auto;
    }

    .discount-modal-content h2 {
        font-size: 15px;
        margin-bottom: 6px;
    }

    .form-group {
        margin-bottom: 5px;
    }

    .form-group label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .form-group input {
        min-height: 34px;
        padding: 5px 8px;
        font-size: 14px;
    }

    .radio-label {
        font-size: 12px;
    }

    .primary-btn {
        font-size: 13px;
        padding: 8px 12px;
        min-height: 36px;
    }

    .modal-divider {
        margin: 6px 0 4px 0;
    }

    .modal-divider span {
        font-size: 10px;
    }

    .contact-buttons {
        gap: 5px;
        margin-bottom: 6px;
    }

    .whatsapp-btn,
    .call-btn {
        min-height: 36px;
        padding: 7px 10px;
        font-size: 12px;
    }

    .skip-link {
        font-size: 10px;
        margin-top: 0;
    }
}

/* =================================
   SHORT SCREENS (height-based)
   ================================= */

@media (max-height: 700px) {
    .discount-modal.show {
        align-items: flex-start;
        padding: 10px 0;
    }

    .discount-modal-content {
        max-height: none;
        padding: 12px 16px 10px 16px;
        margin: auto;
    }

    .discount-modal-content h2 {
        font-size: 18px;
        margin-bottom: 4px;
    }

    .modal-subtitle {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .discount-form {
        margin-bottom: 8px;
    }

    .form-group {
        margin-bottom: 6px;
    }

    .form-group label {
        font-size: 11px;
        margin-bottom: 3px;
    }

    .form-group input {
        padding: 7px 10px;
        font-size: 14px;
    }

    .primary-btn {
        padding: 10px 16px;
        font-size: 14px;
    }

    .modal-divider {
        margin: 8px 0 6px 0;
    }

    .contact-buttons {
        gap: 6px;
        margin-bottom: 6px;
    }

    .whatsapp-btn,
    .call-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .skip-link {
        font-size: 12px;
        margin-top: 2px;
    }
}

@media (max-height: 600px) {
    .discount-modal.show {
        align-items: flex-start;
        padding: 5px 0;
    }

    .discount-modal-content {
        max-height: none;
        padding: 10px 14px 8px 14px;
        margin: auto;
    }

    .discount-modal-content h2 {
        font-size: 16px;
        margin-bottom: 2px;
    }

    .modal-subtitle {
        font-size: 11px;
        margin: 0 0 6px 0;
        line-height: 1.3;
    }

    .form-group {
        margin-bottom: 5px;
    }

    .form-group label {
        font-size: 10px;
        margin-bottom: 2px;
    }

    .form-group input {
        padding: 6px 8px;
        font-size: 14px;
        min-height: 34px;
    }

    .primary-btn {
        padding: 8px 14px;
        font-size: 13px;
        min-height: 36px;
    }

    .modal-divider {
        margin: 6px 0 4px 0;
    }

    .modal-divider span {
        font-size: 11px;
    }

    .contact-buttons {
        gap: 5px;
        margin-bottom: 5px;
    }

    .whatsapp-btn,
    .call-btn {
        padding: 7px 10px;
        font-size: 12px;
        min-height: 34px;
    }

    .skip-link {
        font-size: 11px;
        margin-top: 0;
    }
}
