/* ============================================
   LECTOR DE CORREOS - ESTILOS FRONTEND
   Diseño Moderno y Elegante
   ============================================ */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #8b5cf6;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1f2937;
    --light-color: #f9fafb;
    --border-color: #e5e7eb;
    --text-primary: #111827;
    --text-secondary: #6b7280;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
}

/* ============================================
   CONTENEDOR PRINCIPAL
   ============================================ */

.lector-correos-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    max-width: 900px;
    margin: 30px auto;
    padding: 2rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

/* ============================================
   FORMULARIO
   ============================================ */

.lector-correos-form {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    flex-wrap: wrap;
}

.lector-correos-form input[type="text"],
.lector-correos-form input[type="email"] {
    flex: 1;
    min-width: 250px;
    padding: 0.875rem 1.25rem;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    color: var(--text-primary);
}

.lector-correos-form input[type="text"]:focus,
.lector-correos-form input[type="email"]:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.lector-correos-form input[type="text"]::placeholder,
.lector-correos-form input[type="email"]::placeholder {
    color: var(--text-secondary);
}

/* ============================================
   BOTONES
   ============================================ */

.lector-correos-container button[type="submit"],
.lector-correos-container .btn-submit {
    padding: 0.875rem 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.lector-correos-container button[type="submit"]:hover,
.lector-correos-container .btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

.lector-correos-container button[type="submit"]:active,
.lector-correos-container .btn-submit:active {
    transform: translateY(0);
}

/* ============================================
   RESULTADOS
   ============================================ */

.correo-resultado {
    margin-top: 1.5rem;
}

.correos-container {
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.correo-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

.correo-container:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.correo-container strong {
    color: var(--text-primary);
    font-weight: 600;
    display: inline-block;
    min-width: 80px;
}

.correo-container > div {
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.correo-container button {
    background: var(--info-color);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: block;
    width: 100%;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.correo-container button:hover {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.correo-content {
    margin-top: 1rem;
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    background: var(--light-color);
}

.correo-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
}

.correo-content a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
}

.correo-content a:hover {
    text-decoration: underline;
}

/* ============================================
   ALERTAS Y MENSAJES
   ============================================ */

.correo-resultado .error,
.correo-resultado .alert {
    max-width: 100%;
    margin: 1.5rem auto;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border-left: 4px solid;
    box-shadow: var(--shadow-sm);
    font-weight: 500;
}

.correo-resultado .error {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger-color);
    color: #991b1b;
}

.correo-resultado .alert {
    background: rgba(245, 158, 11, 0.1);
    border-color: var(--warning-color);
    color: #92400e;
}

/* ============================================
   PÁGINAS PROPIAS DE CARRITO / CHECKOUT / RESUMEN
   ============================================ */

.lector-woo-page {
    max-width: 1100px;
    margin: 30px auto;
    padding: 2rem;
    background: #ffffff !important;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    color: #111827 !important;
}

.lector-woo-header {
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.lector-woo-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
}

.lector-woo-content {
    background: #ffffff !important;
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow-md);
}

.lector-woo-page .woocommerce {
    color: #111827 !important;
}

.lector-woo-page table.shop_table {
    width: 100%;
    border-collapse: collapse;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #ffffff !important;
}

.lector-woo-page table.shop_table th,
.lector-woo-page table.shop_table td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.35);
    vertical-align: middle;
}

.lector-woo-page table.shop_table th {
    background: #f3f4f6 !important;
    color: #111827 !important;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.06em;
}

.lector-woo-page table.shop_table td {
    font-size: 0.9rem;
}

.lector-woo-page a {
    color: #2563eb !important;
    text-decoration: none;
    font-weight: 500;
}

.lector-woo-page a:hover {
    color: #1d4ed8 !important;
    text-decoration: underline;
}

.lector-woo-page .cart_totals {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(148, 163, 184, 0.4);
}

.lector-woo-page .cart_totals h2 {
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.lector-woo-page .woocommerce-cart-form__contents .product-remove a.remove {
    color: #f97316 !important;
}

.lector-woo-page .woocommerce-cart-form__contents .product-remove a.remove:hover {
    background: rgba(248, 113, 113, 0.1);
}

.lector-woo-page .woocommerce-message,
.lector-woo-page .woocommerce-error,
.lector-woo-page .woocommerce-info {
    border-radius: var(--radius-md);
    border-left-width: 4px;
    padding: 0.85rem 1rem;
    margin-bottom: 1rem;
}

.lector-woo-page .woocommerce-message {
    border-left-color: var(--success-color);
}

.lector-woo-page .woocommerce-error {
    border-left-color: var(--danger-color);
}

.lector-woo-page .woocommerce-info {
    border-left-color: var(--info-color);
}

.lector-woo-page .woocommerce-message::before,
.lector-woo-page .woocommerce-error::before,
.lector-woo-page .woocommerce-info::before {
    display: none;
}

.lector-woo-page .button,
.lector-woo-page button,
.lector-woo-page input[type="submit"] {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark)) !important;
    color: #f9fafb !important;
    border: none;
    padding: 0.7rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.92rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lector-woo-page .button:hover,
.lector-woo-page button:hover,
.lector-woo-page input[type="submit"]:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.lector-woo-page .button.alt,
.lector-woo-page .button.checkout-button {
    background: linear-gradient(135deg, #22c55e, #16a34a) !important;
}

.lector-woo-page .woocommerce-checkout form.checkout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.4fr);
    gap: 2rem;
}

.lector-woo-page .woocommerce-billing-fields,
.lector-woo-page .woocommerce-shipping-fields {
    background: #ffffff !important;
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.lector-woo-page .woocommerce-billing-fields h3,
.lector-woo-page .woocommerce-shipping-fields h3,
.lector-woo-page #order_review_heading {
    color: #111827 !important;
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.lector-woo-page .woocommerce-additional-fields {
    margin-top: 1rem;
}

.lector-woo-page .woocommerce-checkout-review-order {
    background: #ffffff !important;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.lector-woo-page .woocommerce-checkout-review-order-table tfoot th,
.lector-woo-page .woocommerce-checkout-review-order-table tfoot td {
    border-top-color: rgba(148, 163, 184, 0.4);
}

.lector-woo-page .woocommerce-order {
    background: #ffffff !important;
    padding: 1.75rem;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.45);
}

.lector-woo-page .woocommerce-order-overview,
.lector-woo-page .woocommerce-order-details {
    color: #111827 !important;
}

.lector-woo-page .woocommerce-order-details table.woocommerce-table {
    background: transparent;
}

.lector-woo-page .woocommerce-order-details table.woocommerce-table th {
    background: #f3f4f6 !important;
}

.lector-woo-page .woocommerce-order-details table.woocommerce-table td {
    border-bottom-color: rgba(148, 163, 184, 0.4);
}

.lector-woo-page .woocommerce-form-row label {
    color: #111827 !important;
}

.lector-woo-page .woocommerce-input-wrapper input,
.lector-woo-page .woocommerce-input-wrapper select,
.lector-woo-page .woocommerce-input-wrapper textarea {
    background: #ffffff !important;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.55);
    color: #e5e7eb;
}

.lector-woo-page .woocommerce-input-wrapper input:focus,
.lector-woo-page .woocommerce-input-wrapper select:focus,
.lector-woo-page .woocommerce-input-wrapper textarea:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.lector-cart-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.2fr);
    gap: 1.75rem;
}

.lector-cart-items {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.lector-cart-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.35);
}

.lector-cart-item-main {
    display: flex;
    gap: 1rem;
}

.lector-cart-thumb img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 0.5rem;
}

.lector-cart-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.lector-cart-title a {
    color: #111827;
    font-weight: 600;
}

.lector-cart-meta {
    margin-top: 0.25rem;
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    gap: 0.75rem;
}

.lector-cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
}

.lector-cart-line-total {
    font-weight: 700;
    color: #111827;
}

.lector-cart-remove-form button {
    background: transparent !important;
    color: #f97316 !important;
    border: none;
    padding: 0;
    font-size: 0.8rem;
}

.lector-cart-summary {
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid rgba(148, 163, 184, 0.5);
    padding: 1.5rem 1.25rem;
}

.lector-cart-summary h3 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.lector-cart-totals {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
}

.lector-cart-totals li {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.lector-cart-totals li strong {
    font-weight: 700;
}

.lector-cart-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.lector-cart-button-secondary,
.lector-cart-button-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.7rem 1.2rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-decoration: none;
}

.lector-cart-button-secondary {
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(148, 163, 184, 0.6);
}

.lector-cart-button-primary {
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: #f9fafb;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    .lector-correos-container {
        margin: 15px;
        padding: 1.5rem;
    }

    .lector-correos-form {
        flex-direction: column;
        align-items: stretch;
    }

    .lector-correos-form input[type="text"],
    .lector-correos-form input[type="email"] {
        min-width: 100%;
        width: 100%;
    }

    .lector-correos-container button[type="submit"],
    .lector-correos-container .btn-submit {
        width: 100%;
    }

    .correo-container {
        padding: 1rem;
    }

    .correo-content {
        padding: 1rem;
        max-height: 400px;
    }
}

/* ============================================
   ANIMACIONES
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.correo-container {
    animation: fadeIn 0.3s ease;
}

/* ============================================
   UTILIDADES
   ============================================ */

.lector-text-center {
    text-align: center;
}

.lector-mt-1 { margin-top: 0.5rem; }
.lector-mt-2 { margin-top: 1rem; }
.lector-mt-3 { margin-top: 1.5rem; }
.lector-mb-1 { margin-bottom: 0.5rem; }
.lector-mb-2 { margin-bottom: 1rem; }
.lector-mb-3 { margin-bottom: 1.5rem; }
