/**
 * Estilos adicionales para coincidir con el tema de Sears
 * Version: 1.0.0
 */

/* === Wrapper Global === */
.swr-wedding-page-wrapper {
    background: #f8f9fa;
    min-height: 400px;
}

.swr-couple-dashboard {
    background: transparent;
}

/* === Botones - Estilo Sears === */
.swr-couple-dashboard .button,
.swr-couple-dashboard .button-primary {
    padding: 12px 24px;
    border-radius: 25px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.swr-couple-dashboard .button {
    background: white;
    color: #003b71;
    border: 2px solid #003b71;
}

.swr-couple-dashboard .button:hover {
    background: #003b71;
    color: white;
}

.swr-couple-dashboard .button-primary {
    background: #003b71;
    color: white;
    border: 2px solid #003b71;
}

.swr-couple-dashboard .button-primary:hover {
    background: #00509e;
    border-color: #00509e;
}

/* === Formularios - Estilo Sears === */
.swr-form-group {
    margin-bottom: 20px;
}

.swr-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #212529;
    font-size: 0.95rem;
}

.swr-form-group input[type="text"],
.swr-form-group input[type="email"],
.swr-form-group input[type="tel"],
.swr-form-group input[type="date"],
.swr-form-group textarea,
.swr-form-group select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
}

.swr-form-group input:focus,
.swr-form-group textarea:focus,
.swr-form-group select:focus {
    border-color: #003b71;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 59, 113, 0.1);
}

.swr-form-group small {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.875rem;
}

/* === Tablas - Estilo Sears === */
.swr-wishlist-table table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.swr-wishlist-table thead {
    background: #003b71;
    color: white;
}

.swr-wishlist-table th {
    padding: 16px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    /* Mantener color y fondo fijo en header, sin hover */
    background-color: #003b71 !important;
    color: white !important;
    /* Sticky header */
    position: sticky;
    top: 0;
    z-index: 10;
}

.swr-wishlist-table thead th:hover {
    /* Prevenir cambio de color en hover del header */
    background-color: #002d54 !important;
    color: white !important;
}

.swr-wishlist-table td {
    padding: 16px;
    border-bottom: 1px solid #dee2e6;
}

.swr-wishlist-table tr:last-child td {
    border-bottom: none;
}

/* Solo aplicar hover a filas de datos, no al header */
.swr-wishlist-table tbody tr:hover {
    background: #f8f9fa;
}

.swr-product-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.swr-product-cell img {
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

.button-small {
    padding: 8px 16px;
    font-size: 0.875rem;
    border-radius: 4px;
    border: 1px solid #003b71;
    background: white;
    color: #003b71;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-right: 5px;
}

.button-small:hover {
    background: #003b71;
    color: white;
}

.button-small.button-danger {
    border-color: #dc3545;
    color: #dc3545;
}

.button-small.button-danger:hover {
    background: #dc3545;
    color: white;
}

/* === Tarjetas de Detalles - Estilo Mi Cuenta === */
.swr-purchase-card {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.swr-purchase-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.swr-purchase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #dee2e6;
}

.swr-purchase-header strong {
    color: #003b71;
    font-size: 1.1rem;
}

.swr-purchase-date {
    color: #6c757d;
    font-size: 0.9rem;
}

.swr-purchase-body p {
    margin: 10px 0;
    line-height: 1.6;
}

.swr-guest-message {
    background: #f8f9fa;
    border-left: 4px solid #003b71;
    padding: 15px;
    margin-top: 15px;
    border-radius: 4px;
}

.swr-guest-message p {
    margin: 5px 0;
    font-style: italic;
    color: #495057;
}

/* === Navegación de Tabs - Estilo Sears === */
.swr-dashboard-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.swr-tab {
    padding: 16px 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    color: #6c757d;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.swr-tab:hover {
    background: rgba(0, 59, 113, 0.05);
    color: #003b71;
}

.swr-tab.active {
    color: #003b71;
    background: white;
    border-bottom-color: #003b71;
}

/* === Tab Content === */
.swr-tab-content {
    display: none;
}

.swr-tab-content.active {
    display: block;
}

.swr-tab-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.swr-tab-header h2 {
    margin: 0;
    color: #003b71;
}

/* === Badges y Etiquetas === */
.swr-available-badge {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.swr-priority-badge {
    display: inline-block;
    background: #ffc107;
    color: #212529;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
}

.swr-priority-high {
    background: #dc3545;
    color: white;
}

.swr-priority-medium {
    background: #ffc107;
    color: #212529;
}

.swr-priority-low {
    background: #6c757d;
    color: white;
}

/* === Estadísticas - Cards === */
.swr-stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.swr-stat-card {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.swr-stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 59, 113, 0.15);
    border-color: #003b71;
}

.swr-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #003b71;
    margin-bottom: 10px;
}

.swr-stat-label {
    font-size: 0.9rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* === Progress Bar - Estilo Sears === */
.swr-progress-bar {
    height: 40px;
    background: #e9ecef;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    border: 1px solid #dee2e6;
}

.swr-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #003b71, #00509e);
    transition: width 0.5s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 0.95rem;
}

/* === Sección de Compartir === */
.swr-share-section {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.swr-share-url {
    margin-bottom: 30px;
}

.swr-share-url label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #003b71;
}

.swr-social-share h3 {
    color: #003b71;
    margin-bottom: 15px;
}

.swr-social-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.swr-share-btn {
    padding: 12px 24px;
    border: 2px solid #003b71;
    background: white;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    color: #003b71;
}

.swr-share-btn:hover {
    background: #003b71;
    color: white;
}

/* === Lista de Compras === */
.swr-purchases-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* === Input Group === */
.swr-input-group {
    display: flex;
    gap: 10px;
}

.swr-input-group input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 1rem;
}

.swr-input-group button {
    padding: 12px 24px;
    background: #003b71;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.swr-input-group button:hover {
    background: #00509e;
}

/* === Mensajes === */
.swr-form-messages .success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

.swr-form-messages .error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* === Código QR === */
.swr-qr-section {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
}

.swr-qr-image {
    max-width: 300px;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

/* === Header de Dashboard === */
.swr-dashboard-header {
    background: linear-gradient(135deg, #003b71, #00509e);
    color: white;
    padding: 40px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.swr-dashboard-header h1 {
    color: white;
    margin: 0;
}

.swr-dashboard-actions {
    display: flex;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

/* === Responsive === */
@media (max-width: 768px) {
    .swr-wishlist-table {
        overflow-x: auto;
    }

    .swr-dashboard-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .swr-tab {
        white-space: nowrap;
    }

    .swr-stat-card {
        margin-bottom: 20px;
    }

    .swr-input-group {
        flex-direction: column;
    }

    .swr-input-group button {
        width: 100%;
    }
}

/* === Animaciones === */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.swr-tab-content.active {
    animation: fadeIn 0.3s ease;
}

/* === Modal === */
.swr-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    /* Por encima del header sticky del tema y de la barra de admin */
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
}

.swr-modal {
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    /* El modal NO hace scroll – sólo el body interior */
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.swr-modal-header {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #003b71;
    color: white;
    border-radius: 8px 8px 0 0;
}

.swr-modal-header h3 {
    margin: 0;
    color: white;
}

.swr-modal-close {
    background: none;
    border: none;
    font-size: 2rem;
    color: white;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.swr-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.swr-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.swr-modal-footer {
    padding: 20px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* === Resultados de Búsqueda de Productos === */
.swr-search-results {
    margin-top: 15px;
}

.swr-product-results {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.swr-product-result {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.swr-product-result:hover {
    border-color: #003b71;
    background: #f8f9fa;
}

.swr-product-result-image {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
}

.swr-product-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
}

.swr-product-result-image .no-image {
    width: 100%;
    height: 100%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    color: #6c757d;
    border-radius: 4px;
}

.swr-product-result-info {
    flex-grow: 1;
}

.swr-product-result-info h4 {
    margin: 0 0 5px 0;
    font-size: 1rem;
    color: #003b71;
}

.swr-product-result-info .price {
    margin: 0;
    font-weight: 600;
    color: #28a745;
}

.swr-selected-product-info {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.swr-selected-product-info img {
    border-radius: 4px;
    border: 1px solid #dee2e6;
}

/* === Mejoras de Estilo para Help Text === */
.swr-help-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 0.875rem;
    font-style: italic;
}

/* === Loading Indicator === */
#search-loading {
    color: #003b71;
    font-weight: 600;
}

#search-loading p {
    margin: 0;
}

/* === Modal Responsive === */
@media (max-width: 768px) {
    .swr-modal {
        width: 95%;
        max-height: 95vh;
    }

    .swr-modal-header h3 {
        font-size: 1.1rem;
    }

    .swr-product-result {
        flex-direction: column;
        text-align: center;
    }

    .swr-product-result-image {
        margin: 0 auto;
    }
}

/* === Empty States === */
.swr-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
}

.swr-empty-state p {
    margin: 10px 0;
    font-size: 0.95rem;
}

/* === Mejoras en el footer del modal === */
.swr-modal-footer .button {
    min-width: 120px;
}
