/* ============================================================
   Global Import – Transferencia Bancaria | Frontend Styles
   ============================================================ */

/* ======================================================
   PAGINA DE CONFIRMACION LIMPIA (gi-ty-page)
   ====================================================== */

/* Ocultar elementos de distraccion del checkout de WC */
.gi-thankyou .woocommerce-order-received .woocommerce-thankyou-order-received,
.gi-thankyou .woocommerce-order-received ul.woocommerce-thankyou-order-details,
.gi-thankyou .woocommerce-order-received .woocommerce-customer-details,
.gi-thankyou .woocommerce-notice,
.gi-thankyou .woocommerce-info,
.gi-thankyou .woocommerce-message {
    display: none !important;
}

/* Contenedor principal de la pagina de confirmacion */
.gi-ty-page {
    max-width: 680px;
    margin: 40px auto;
    padding: 0 16px;
    display: flex !important;
    flex-direction: column !important;
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Cabecera */
.gi-ty-header {
    text-align: center;
    padding: 32px 24px 28px;
    background: #1a1a2e;
    border-radius: 10px 10px 0 0;
    margin-bottom: 0;
    order: 1 !important; /* Primero */
}

.gi-ty-logo {
    height: 48px;
    width: auto;
    filter: brightness(0) invert(1);
    display: block;
    margin: 0 auto 18px;
}

.gi-ty-title {
    color: #ffffff;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 8px;
    line-height: 1.3;
}

.gi-ty-subtitle {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.5;
}

/* Tarjetas de seccion */
.gi-ty-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-top: none;
    padding: 28px;
    order: 10 !important; /* Forzado al final absoluto */
}

.gi-ty-card:last-child {
    border-radius: 0 0 10px 10px;
}

.gi-ty-card + .gi-ty-card {
    border-top: 2px solid #f3f4f6;
}

.gi-ty-card-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a1a2e;
    margin: 0 0 18px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Tabla de items del pedido */
.gi-ty-items {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.gi-ty-items thead th {
    text-align: left;
    color: #6b7280;
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    padding: 0 0 10px;
    border-bottom: 1px solid #e5e7eb;
}

.gi-ty-items tbody tr:last-child td {
    border-bottom: none;
}

.gi-ty-items tbody td {
    padding: 12px 0;
    border-bottom: 1px solid #f3f4f6;
    vertical-align: middle;
    color: #1f2937;
}

.gi-ty-items tfoot td {
    padding: 10px 0;
    color: #4b5563;
    font-size: 0.88rem;
}

.gi-ty-total-row td {
    padding-top: 14px !important;
    border-top: 2px solid #e5e7eb;
    font-size: 1rem !important;
    color: #1a1a2e !important;
}

.gi-col-product {
    width: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gi-col-qty {
    width: 60px;
    text-align: center;
}

.gi-col-price {
    width: 110px;
    text-align: right;
}

th.gi-col-qty,
th.gi-col-price {
    text-align: right;
}

/* Imagen del producto en la tabla */
.gi-ty-product-img {
    width: 48px;
    height: 48px;
    object-fit: cover;
    border-radius: 5px;
    border: 1px solid #e5e7eb;
    flex-shrink: 0;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

/* Responsive: tabla */
@media (max-width: 500px) {
    .gi-ty-card {
        padding: 20px 16px;
    }
    .gi-col-qty {
        display: none;
    }
    .gi-ty-items thead th.gi-col-qty {
        display: none;
    }
}

/* ======================================================
   FORMULARIO DE CONSULTA DE PEDIDO
   ====================================================== */

.gi-lookup-card {
    padding: 32px;
}

.gi-lookup-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-top: 4px;
}

.gi-field-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gi-field-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #374151;
    letter-spacing: 0.2px;
}

.gi-field-group input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    font-size: 0.95rem;
    color: #1f2937;
    background: #fafafa;
    outline: none;
    transition:
        border-color 0.18s,
        box-shadow 0.18s;
    box-sizing: border-box;
}

.gi-field-group input:focus {
    border-color: #1a1a2e;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 26, 46, 0.08);
}

.gi-field-group input::placeholder {
    color: #9ca3af;
}

/* Aviso de error del formulario */
.gi-notice--error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 13px 16px;
    border-radius: 7px;
    font-size: 0.88rem;
    line-height: 1.5;
}

/* Enlace de contacto bajo el formulario */
.gi-lookup-contact {
    text-align: center;
    font-size: 0.82rem;
    color: #9ca3af;
    margin-top: 18px;
}

.gi-lookup-contact a {
    color: #6b7280;
    text-decoration: underline;
}

/* ======================================================
   TIPOGRAFIA Y REFINAMIENTO GENERAL (gi-ty-page)
   ====================================================== */

/* Asegurar que el contenido no sea afectado por el tema */
.gi-ty-page * {
    box-sizing: border-box;
}

.gi-ty-page p {
    margin: 0;
}

.gi-ty-page a {
    color: inherit;
}

/* Cabecera: sin logo, solo texto */
.gi-ty-header {
    background: #1a1a2e;
    border-radius: 10px 10px 0 0;
    padding: 36px 32px 30px;
    text-align: center;
    color: #fff;
}

.gi-ty-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 10px;
    line-height: 1.3;
    letter-spacing: -0.3px;
}

.gi-ty-subtitle {
    font-size: 0.93rem;
    color: rgba(255, 255, 255, 0.75);
    line-height: 1.55;
    margin: 0;
    max-width: 460px;
    margin-left: auto;
    margin-right: auto;
}

/* Boton a ancho completo en el formulario */
.gi-lookup-form .gi-btn {
    margin-top: 4px;
}

/* ── Estado de exito tras subir comprobante ── */
.gi-success-state {
    text-align: center;
    padding: 36px 24px 28px;
    animation: gi-fade-in 0.4s ease;
}

@keyframes gi-fade-in {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.gi-success-icon-wrap {
    margin: 0 auto 20px;
    width: 64px;
    height: 64px;
}

.gi-success-svg {
    width: 64px;
    height: 64px;
    display: block;
}

.gi-success-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #15803d;
    margin: 0 0 14px;
}

.gi-success-desc {
    font-size: 0.92rem;
    color: #4b5563;
    line-height: 1.6;
    margin: 0 0 10px;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.gi-success-date {
    margin-top: 16px;
    font-size: 0.82rem;
    color: #9ca3af;
    padding-top: 14px;
    border-top: 1px solid #f3f4f6;
}

/* ── Contenedor principal ── */
.gi-transfer-wrap {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    margin: 32px 0;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.07);
    order: 5 !important; /* En medio, después del header */
    font-family:
        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ── Cabecera con logo ── */
.gi-transfer-header {
    background: #1a1a2e;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.gi-transfer-header .gi-logo {
    height: 44px;
    width: auto;
    filter: brightness(0) invert(1); /* logo blanco sobre fondo oscuro */
}

.gi-transfer-header h2 {
    color: #ffffff;
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* ── Tabla de datos bancarios ── */
.gi-bank-details {
    padding: 28px 32px;
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.gi-bank-title {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: #1a1a2e;
}

.gi-bank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.gi-bank-table th,
.gi-bank-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    text-align: left;
    vertical-align: middle;
}

.gi-bank-table th {
    width: 42%;
    color: #6b7280;
    font-weight: 600;
    white-space: nowrap;
}

.gi-bank-table td {
    color: #1f2937;
}

.gi-bank-table td.gi-highlight {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
    letter-spacing: 0.5px;
}

.gi-bank-table tr.gi-total-row th,
.gi-bank-table tr.gi-total-row td {
    background: #fff8e1;
    border-top: 2px solid #f0b429;
    border-bottom: 2px solid #f0b429;
}

/* ── Sección de comprobante ── */
.gi-proof-section {
    padding: 28px 32px;
}

.gi-proof-title {
    margin: 0 0 8px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1a1a2e;
}

.gi-proof-desc {
    color: #6b7280;
    margin: 0 0 20px;
    line-height: 1.6;
}

/* ── Zona de arrastre de archivo ── */
.gi-file-drop-area {
    border: 2px dashed #cbd5e1;
    border-radius: 8px;
    padding: 36px 24px;
    text-align: center;
    transition:
        border-color 0.2s,
        background 0.2s;
    cursor: pointer;
    background: #f8fafc;
    position: relative;
}

.gi-file-drop-area.gi-drag-over {
    border-color: #1a1a2e;
    background: #f0f4ff;
}

.gi-file-drop-area p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

.gi-file-label {
    color: #2563eb;
    text-decoration: underline;
    cursor: pointer;
    font-weight: 600;
}

.gi-file-input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
    width: 100%;
    height: 100%;
}

/* ── Preview de imagen ── */
.gi-preview-wrap {
    margin-top: 16px;
}

.gi-preview-wrap img {
    max-width: 100%;
    max-height: 260px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    display: block;
    margin: 0 auto 8px;
}

.gi-preview-name {
    font-size: 0.85rem;
    color: #6b7280;
    text-align: center;
    margin: 0;
}

/* ── Botón principal ── */
.gi-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: 7px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition:
        background 0.2s,
        transform 0.1s;
    margin-top: 18px;
    width: 100%;
}

.gi-btn--primary {
    background: #1a1a2e;
    color: #ffffff;
}

.gi-btn--primary:hover:not(:disabled) {
    background: #2d2d50;
}

.gi-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Feedback / Mensajes ── */
.gi-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 0.9rem;
    display: none;
}

.gi-feedback.gi-feedback--success {
    display: block;
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.gi-feedback.gi-feedback--error {
    display: block;
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* ── Botones de Copiar ── */
.gi-copy-btn {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    margin-left: 8px;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
    vertical-align: middle;
    display: inline-flex;
    align-items: center;
    color: #1a1a2e;
}
.gi-copy-btn:hover {
    opacity: 1;
}
.gi-copy-all-wrap {
    margin-top: 20px;
    text-align: center;
}
.gi-copy-all-btn {
    font-size: 0.9rem;
    padding: 12px 24px;
    background: #f1f5f9;
    color: #1a1a2e;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
}
/* ── Avisos de estado ── */
.gi-notice {
    padding: 18px 20px;
    border-radius: 8px;
    line-height: 1.6;
}

.gi-notice--success {
    background: #d1fae5;
    border: 1px solid #6ee7b7;
    color: #065f46;
}

.gi-notice--info {
    background: #fef9c3;
    border: 1px solid #fde047;
    color: #713f12;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .gi-transfer-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 20px;
        gap: 12px;
    }

    .gi-bank-details,
    .gi-proof-section {
        padding: 20px;
    }

    .gi-bank-table th {
        width: auto;
    }
}

/* ── Toast de Feedback (Mensaje de Copiado) ── */
.gi-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #1a1a2e;
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 999999 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.gi-toast.is-active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
}
