/* Base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Arial', sans-serif;
}

body {
    color: #333;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header styles */
.header {
    width: 100%;
    border-bottom: 2px solid #eaeaea;
    padding: 15px 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: white;
}

.header-center {
    display: flex;
    justify-content: center;
}

.movistar-logo {
    height: 48px;
    width: auto;
}

/* Content layout */
.content {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.main-content {
    width: 100%;
    padding: 16px;
}

/* Tabs */
.tabs {
    display: flex;
    background-color: #f5f5f5;
    border-radius: 25px;
    padding: 5px;
    width: fit-content;
    margin: 0 auto 32px auto;
    border: 1px solid #eaeaea;
}

.tab-button {
    border-radius: 20px;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border: none;
    background: transparent;
    color: #00a9e0;
    cursor: pointer;
    transition: all 0.2s;
}

.tab-button.active {
    background-color: #00a9e0;
    color: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Payment section */
.payment-section {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.subtitle {
    text-align: center;
    font-size: 20px;
    margin-bottom: 24px;
    font-weight: 400;
    color: #333;
}

.subtitle strong {
    font-weight: 700;
    color: #0b2739;
}

/* Toggle buttons */
.toggle-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 30px;
}

.toggle-button {
    padding: 8px 24px;
    border-radius: 20px;
    font-size: 14px;
    cursor: pointer;
    background-color: white;
    color: #333;
    border: 1px solid #666;
}

.toggle-button.active {
    background-color: #0b2739;
    color: white;
    border-color: #0b2739;
}

/* Auto pay button */
.auto-pay-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 400px;
    margin: 0 auto 30px auto;
    padding: 12px 16px;
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 25px;
    color: #a0a0a0;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s;
}

.auto-pay-icon {
    margin-right: 8px;
    color: #d0d0d0;
}

/* Input field */
.input-container {
    width: 100%;
    max-width: 400px;
    margin-bottom: 16px;
}

.input-field {
    display: flex;
    align-items: center;
    border-bottom: 2px solid #0b2739;
    padding: 8px 0;
}

.phone-icon-svg {
    margin-right: 12px;
    color: #666;
}

#phone-input {
    appearance: none;
    background-color: transparent;
    border: none;
    width: 100%;
    color: #333;
    padding: 4px 8px;
    line-height: 1.5;
    font-size: 16px;
}

#phone-input:focus {
    outline: none;
}

/* Error message */
.error-message {
    display: none;
    background-color: #ffebee;
    color: #d32f2f;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {opacity: 0; transform: translateY(-10px);}
    to {opacity: 1; transform: translateY(0);}
}

/* Submit button */
.submit-button {
    width: 100%;
    max-width: 400px;
    background-color: #d3d3d3;
    color: white;
    font-weight: 500;
    padding: 14px 16px;
    border-radius: 25px;
    border: none;
    margin-bottom: 30px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.2s;
}

.submit-button:not([disabled]):hover {
    background-color: #bbb;
}

/* Payment methods (mobile) */
.payment-methods-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.payment-title {
    text-align: center;
    font-weight: 500;
    color: #0b2739;
    margin-bottom: 16px;
}

.payment-icons {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.payment-methods-img {
    width: 250px;
    height: auto;
}

.info-container {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: #0b2739;
}

.info-icon {
    margin-right: 4px;
    font-size: 16px;
}

/* Payment link */
.payment-link-desktop {
    display: block;
    width: 100%;
    margin-top: 20px;
}

.payment-help-link {
    color: #00a9e0;
    font-size: 14px;
    text-decoration: underline;
    margin-bottom: 24px;
    display: block;
    text-align: center;
}

.epayco-footer-main {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 16px;
    gap: 6px;
    color: #333;
    font-size: 13px;
}

.epayco-footer-main .lock-icon {
    color: #333;
}

.epayco-footer-main img {
    height: 28px;
}

/* ePayco logo in modal footers */
.epayco-logo {
    height: 28px;
    width: auto;
}

.epayco-container {
    display: flex;
    align-items: center;
    gap: 8px;
}

.text-gray {
    color: #666;
    font-size: 12px;
}


/* COVID info (hidden) */
.covid-info {
    display: none !important;
}

/* Banner */
.banner {
    width: 100%;
}

.banner-desktop {
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-mobile {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Media queries for desktop */
@media (min-width: 768px) {
    .header-mobile {
        display: none;
    }

    .header-desktop {
        display: flex;
    }

    .content {
        flex-direction: row;
    }

    .main-content {
        width: 50%;
    }

    .banner {
        width: 50%;
    }

    .banner-desktop {
        display: block;
    }

    .banner-mobile {
        display: none;
    }

    .payment-methods-mobile {
        display: none;
    }

    .payment-link-desktop {
        display: block;
    }

    .covid-info {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 4px;
    }
}

/* NUEVOS ESTILOS PARA MODALES Y FUNCIONALIDADES ADICIONALES */

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    color: white;
    display: none;
}

.loader {
    border: 5px solid #f3f3f3;
    border-top: 5px solid #0b2739;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {opacity: 0; transform: translateY(-20px);}
    to {opacity: 1; transform: translateY(0);}
}

.modal-header {
    background-color: #f8f8f8;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eaeaea;
}

.modal-logo {
    height: 30px;
    width: auto;
}

.modal-title {
    color: #0b2739;
    font-size: 22px;
    margin: 20px 0;
    text-align: center;
    padding: 0 20px;
}

.close-button {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #0b2739;
}

.modal-footer {
    background-color: #f8f8f8;
    padding: 15px 20px;
    border-top: 1px solid #eaeaea;
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

/* Payment methods */
.bill-info {
    background-color: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    margin: 0 20px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.bill-info p {
    margin: 5px 0;
    font-size: 16px;
}

.bill-info span {
    font-weight: bold;
    color: #0b2739;
}

/* Estilos para el descuento */
.discount-text {
    color: #4CAF50;
    font-weight: bold;
    font-size: 16px;
    margin: 10px 0;
    background-color: #e8f5e9;
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.discounted-price {
    font-weight: bold;
    color: #d32f2f;
    font-size: 18px;
}

#original-amount {
    text-decoration: line-through;
    color: #999;
}

.payment-methods {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
    margin-bottom: 20px;
}

.payment-method {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    cursor: pointer;
    width: 45%;
    transition: all 0.3s ease;
    background-color: #fff;
}

.payment-method:hover {
    border-color: #0b2739;
    background-color: #f5f9ff;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.payment-logo {
    width: 80px;
    height: auto;
    margin-bottom: 15px;
    transition: transform 0.2s ease;
}

.payment-method:hover .payment-logo {
    transform: scale(1.05);
}

.payment-method p {
    font-weight: 500;
    color: #333;
}

/* Forms */
.payment-form {
    padding: 0 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 15px;
}

.half {
    width: 50%;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.2s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #0b2739;
    box-shadow: 0 0 0 2px rgba(11, 39, 57, 0.1);
}

.submit-payment {
    background-color: #0b2739;
    color: white;
    border: none;
    padding: 14px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    width: 100%;
    margin-top: 15px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.submit-payment:hover {
    background-color: #0a3d5c;
    transform: translateY(-2px);
}

.submit-payment:active {
    transform: translateY(0);
}

/* Success modal */
.success-content {
    text-align: center;
    padding: 0 20px 20px;
}

.success-icon {
    background-color: #4CAF50;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    margin: 20px auto;
    box-shadow: 0 4px 10px rgba(76, 175, 80, 0.3);
    animation: successPulse 1.5s infinite;
}

.error-icon {
    background-color: #f44336;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    margin: 20px auto;
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.3);
}

@keyframes successPulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

#reference-number {
    font-weight: bold;
    color: #0b2739;
    font-size: 18px;
    background-color: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
}

/* Responsive adjustments for modals */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .half {
        width: 100%;
    }

    .payment-methods {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .payment-method {
        width: 80%;
    }
}

.error-icon {
    background-color: #f44336;
    color: white;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 36px;
    margin: 20px auto;
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.3);
}

/* Estilos para elementos deshabilitados */
.payment-method[style*="opacity: 0.5"] {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    background-color: #f5f5f5 !important;
    border-color: #ddd !important;
}

.payment-method[style*="opacity: 0.5"]:hover {
    transform: none !important;
    box-shadow: none !important;
    border-color: #ddd !important;
    background-color: #f5f5f5 !important;
}

.payment-method[style*="opacity: 0.5"] .payment-logo {
    filter: grayscale(100%);
}

.payment-method[style*="opacity: 0.5"]:hover .payment-logo {
    transform: none !important;
}

/* =========================================
   INVOICE RESULT E-PAYCO STYLE (NEW)
========================================= */
.invoice-result-content.modal-content {
    background-color: #ffffff;
    padding: 0;
    border-radius: 0;
    margin: 0;
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-shadow: none;
    overflow-y: auto;
    font-family: Arial, sans-serif;
}

.full-page-header {
    width: 100%;
    border-bottom: 2px solid #eaeaea; /* Light border similar to image */
    padding: 20px 0;
    margin-bottom: 60px;
    display: flex;
    justify-content: center;
}

.logo-center {
    height: 35px;
    width: auto;
}

.invoice-container {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    padding: 0 20px;
    padding-bottom: 50px;
}

.invoice-header-row {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.invoice-graphic {
    width: 150px;
    margin-right: 20px;
}

.device-illustration {
    width: 100%;
    height: auto;
}

.invoice-user-info {
    flex: 1;
}

.nameClient {
    font-weight: bold;
    color: #444;
    font-size: 16px;
    margin-bottom: 4px;
}

.invoice-line {
    font-size: 14px;
    color: #333;
    font-weight: bold;
    margin-bottom: 2px;
}

.invoice-ref {
    color: #888;
    font-size: 12px;
}

.invoice-bill-info {
    text-align: center;
    margin-bottom: 30px;
    margin-top: -10px;
}

.invoice-info-title {
    color: #333;
    font-size: 16px;
    margin-bottom: 4px;
}

.invoice-bill-no {
    color: #888;
    font-size: 14px;
}

.add-other-btn {
    background-color: transparent;
    border: 1px solid #0099ff;
    color: #0099ff;
    padding: 10px 15px;
    border-radius: 20px;
    width: 100%;
    font-size: 14px;
    cursor: pointer;
    margin-bottom: 24px;
    font-weight: bold;
    transition: all 0.2s;
}

.add-other-btn:hover {
    background-color: #f0f8ff;
}

.invoice-row-details {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    padding: 10px 0;
    border-bottom: 2px solid #0b2739;
    margin-bottom: 30px;
}

.invoice-row-left {
    display: flex;
    align-items: center;
}

.checkbox-checked {
    background-color: #0099ff;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    margin-right: 12px;
}

.invoice-consult-details {
    display: flex;
    flex-direction: column;
}

.invoice-consult-line {
    font-weight: bold;
    font-size: 15px;
    color: #333;
}

.invoice-consult-label {
    color: #888;
    font-size: 12px;
}

.invoice-row-right {
    display: flex;
    align-items: center;
}

.invoice-price-col {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    margin-right: 10px;
}

.invoice-price {
    font-weight: bold;
    font-size: 18px;
    color: #333;
}

.invoice-price-label {
    color: #888;
    font-size: 12px;
}

.dropdown-icon {
    color: #000;
    font-size: 14px;
}

.invoice-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
}

.cancel-btn, .pay-btn {
    width: 160px;
    padding: 12px;
    border-radius: 25px;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    text-align: center;
}

.cancel-btn {
    background-color: #fff;
    color: #0b2739;
    border: 1px solid #0b2739;
}

.pay-btn {
    background-color: #0b2739;
    color: white;
    border: 1px solid #0b2739;
}

.invoice-sms-info {
    text-align: center;
    font-size: 13px;
    color: #333;
    background-color: #fff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.invoice-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: transparent;
    border-top: none;
    margin-top: 0;
    padding: 0;
}

.payment-cards-icons {
    margin-bottom: 10px;
}

.payment-cards-icons img {
    height: 24px;
}