/**
 * Estilos para la sección de Mis Tarjetas de Regalo
 * Diseño elegante inspirado en tarjetas premium
 */

/* Fuentes personalizadas */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@700&family=Open+Sans:wght@400;600&display=swap');

.saks-gift-cards-wrapper {
    padding: 0;
    font-family: 'Open Sans', sans-serif;
}

.saks-gift-cards-intro {
    margin-bottom: 20px;
    color: #666;
    font-size: 14px;
}

.saks-gift-cards-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(600px, 1fr));
    gap: 30px;
    margin-top: 20px;
}

.saks-gift-card-item {
    width: 100%;
    max-width: 600px;
    height: 350px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    overflow: hidden;
    position: relative;
    transition: all 0.3s ease;
}

.saks-gift-card-item:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
    transform: translateY(-5px);
}

/* Lado izquierdo (Azul oscuro) */
.saks-gift-card-left {
    background-color: #003d8d;
    width: 60%;
    padding: 1.8rem 2rem;
    padding-top: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: white;
    position: relative;
    z-index: 2;
}

.saks-gift-card-logo {
    width: 120px;
    margin-bottom: 1rem;
}

/* QR en la esquina superior izquierda */
.saks-gift-card-qr-top {
    width: 110px;
    height: 110px;
    margin-bottom: 1rem;
}

.saks-qr-placeholder {
    width: 100%;
    height: 100%;
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    padding: 8px;
}

.saks-qr-placeholder svg,
.saks-qr-placeholder img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.saks-gift-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.8rem;
    font-weight: 700;
    color: #ffbb00;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.saks-gift-card-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #ccc;
    margin-bottom: 1.5rem;
}

/* Línea dorada divisoria */
.saks-golden-divider {
    position: absolute;
    left: 60%;
    top: 0;
    bottom: 0;
    width: 8px;
    background: linear-gradient(to bottom, #ffbb00, #f7dc6f, #ffbb00);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    z-index: 3;
    transform: translateX(-50%);
}

/* Lado derecho (Blanco con patrón) */
.saks-gift-card-right {
    width: 40%;
    background-color: #f8f8f8;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    text-align: center;
    z-index: 1;
}

/* Patrón decorativo */
.saks-gift-card-right::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="pattern-0" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><path fill="%23e8e8e8" d="M11 25a14 14 0 0114-14h50a14 14 0 0114 14v50a14 14 0 01-14 14h-50a14 14 0 01-14-14zm0-16a14 14 0 0114-14h50a14 14 0 0114 14v50a14 14 0 01-14 14h-50a14 14 0 01-14-14z" transform="scale(0.3) rotate(45 50 50)"/></pattern></defs><rect width="100%" height="100%" fill="url(%23pattern-0)"/></svg>');
    background-size: cover;
    opacity: 0.6;
    z-index: 0;
}

.saks-value-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: #555;
    margin-bottom: 0.5rem;
    z-index: 1;
    position: relative;
}

.saks-value-amount {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1;
    z-index: 1;
    position: relative;
    margin: 0;
}

.displaynone{
    display: none!important;
}

/* Estado de la tarjeta en el lado derecho */
.saks-card-status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 1;
}

.saks-card-status--active,
.saks-card-status--sold {
    background: rgba(76, 175, 80, 0.9);
    color: white;
}

.saks-card-status--used {
    background: rgba(255, 152, 0, 0.9);
    color: white;
}

.saks-card-status--expired {
    background: rgba(244, 67, 54, 0.9);
    color: white;
}

/* Contenedor para los datos de cliente */
.saks-customer-area {
    position: absolute;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    z-index: 4;
}

.saks-customer-info {
    font-size: 0.75rem;
    color: #555;
    text-align: right;
}

.saks-customer-info p {
    margin: 0 0 5px 0;
    line-height: 1.4;
}

.saks-customer-info strong {
    font-weight: 700;
}

.saks-copy-button-mini {
    background: #003d8d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.7rem;
    font-weight: 600;
    margin-top: 8px;
}

.saks-copy-button-mini:hover {
    background: #002a61;
    transform: scale(1.05);
}

.saks-view-qr-button {
    background: #003d8d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 8px;
    display: inline-block;
}

.saks-view-qr-button:hover {
    background: #002a61;
    transform: scale(1.05);
}

.saks-order-link {
    margin-top: 8px !important;
}

.saks-order-link a {
    color: #003d8d;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.7rem;
}

.saks-order-link a:hover {
    text-decoration: underline;
}

/* Estilos del Modal QR */
.saks-qr-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.saks-qr-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

.saks-qr-modal-content {
    position: relative;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 2;
    animation: modalSlideIn 0.3s ease-out;
}

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

.saks-qr-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.saks-qr-modal-close:hover {
    background: #f0f0f0;
    color: #333;
    transform: rotate(90deg);
}

.saks-qr-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #003d8d;
    margin: 0;
    padding: 25px 25px 20px;
    border-bottom: 2px solid #f0f0f0;
    text-align: center;
}

.saks-qr-modal-body {
    padding: 30px 25px;
    text-align: center;
}

.saks-qr-modal-qr-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.saks-qr-modal-qr-container img {
    display: block;
    max-width: 300px;
    width: 100%;
    height: auto;
}

.saks-qr-modal-card-number {
    font-size: 1rem;
    color: #333;
    margin: 15px 0;
    padding: 12px;
    background: #f8f8f8;
    border-radius: 6px;
}

.saks-qr-modal-card-number code {
    font-family: 'Courier New', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: #003d8d;
    letter-spacing: 1px;
}

.saks-qr-modal-instructions {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 15px 0 0 0;
    font-style: italic;
}

/* Responsive */
@media (max-width: 768px) {
    .saks-gift-cards-list {
        grid-template-columns: 1fr;
    }
    
    .saks-gift-card-item {
        height: auto;
        flex-direction: column;
    }
    
    .saks-gift-card-left {
        width: 100%;
        min-height: 250px;
    }
    
    .saks-golden-divider {
        left: 0;
        top: auto;
        bottom: 40%;
        width: 100%;
        height: 8px;
        transform: translateY(50%);
    }
    
    .saks-gift-card-right {
        width: 100%;
        min-height: 200px;
    }
    
    .saks-customer-area {
        position: static;
        align-items: center;
        text-align: center;
        padding: 1rem;
        background: rgba(255, 255, 255, 0.9);
    }
    
    .saks-customer-info {
        text-align: center;
    }
}

/* Animación de entrada */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.saks-gift-card-item {
    animation: slideInUp 0.4s ease-out;
}

.saks-gift-card-item:nth-child(1) { animation-delay: 0.1s; }
.saks-gift-card-item:nth-child(2) { animation-delay: 0.2s; }
.saks-gift-card-item:nth-child(3) { animation-delay: 0.3s; }
.saks-gift-card-item:nth-child(4) { animation-delay: 0.4s; }
.saks-gift-card-item:nth-child(5) { animation-delay: 0.5s; }
.saks-gift-card-item:nth-child(6) { animation-delay: 0.6s; }

/* Estilo para mensaje cuando no hay tarjetas */
.woocommerce-MyAccount-content .woocommerce-message {
    padding: 20px;
    border-left: 4px solid #003d8d;
}

.woocommerce-MyAccount-content .woocommerce-message .button {
    background: #003d8d;
    color: #fff;
    border: none;
}

.woocommerce-MyAccount-content .woocommerce-message .button:hover {
    background: #002a61;
}
