/* ========================================
   WC Credentials Plugin Styles
   ======================================== */

/* Estilos para la sección de credenciales */


.awc-credentials-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 30px 0;
}

.awc-credentials-section h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 1.5em;
}

.awc-credentials-section p {
    margin: 0 0 20px 0;
    color: #666;
}

.awc-credentials-item {
    margin-bottom: 20px;
}

.awc-credentials-item h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.1em;
}

/* Tabla de credenciales */
.awc-credentials-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 15px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.awc-credentials-table th {
    padding: 12px 8px;
    text-align: left;
    border: 1px solid #dee2e6;
    background: #f8f9fa;
    color: #495057;
    font-weight: 600;
}

.awc-credentials-table td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    background: #fff;
}

.awc-credentials-table td:first-child,
.awc-credentials-table td:nth-child(2) {
    font-family: "Courier New", monospace;
    font-weight: 500;
}

/* Caja de información */
.awc-credentials-info-box {
    margin-top: 20px;
    padding: 15px;
    background: #e3f2fd;
    border-radius: 6px;
    border-left: 4px solid #2196f3;
}

.awc-credentials-info-box p {
    margin: 0;
    color: #1976d2;
}

/* Indicador de credenciales en lista de pedidos */
.awc-credentials-indicator {
    display: inline-block;
    color: #28a745;
    font-weight: 600;
    background: #d4edda;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #c3e6cb;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Contenedor del shortcode de credenciales */
.awc-my-credentials-container {
    margin: 30px 0;
}

.awc-section-title {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 2em;
	font-family: var(--e-global-typography-primary-font-family);
}

/* Grid de productos */
.awc-products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding-top: 0px;
    gap: 20px;
}

/* Tarjeta de producto */

.awc-product-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
	border-radius: 10px;
}

/* Acciones del producto */

.awc-products-grid .awc-product-actions{
    display: flex;
    gap: 8px;
    padding-top: 10px;
}
.awc-view-credentials-btn,
.awc-buy-again-btn {
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    text-align: center;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}


.awc-products-grid .awc-product-card .awc-product-title{
    font-size: 18px;
    font-weight: 600;
    line-height: 25px;
    margin: 15px 0 10px;
}

.awc-products-grid .awc-count-badge{
    color: var(--e-global-color-primary);
    font-size: 16px;
}

.awc-products-grid .button.awc-buy-again-btn{
    cursor: pointer;
    padding: .618em 0.8em;
    font-weight: 700;
    border-radius: 3px;
    text-transform: uppercase;
    background-color: #e9e6ed;
    border: 0;
    display: inline-block;
    background-color: var(    --e-global-color-primary);
    color: var(--e-global-color-secondary);
    transform: scale(1);
    transition: all .3s ease-in-out;
    font-size: 14px;
}

.awc-products-grid .button.awc-buy-again-btn:hover{
    transform: scale(1.1);
    transition: all .3s ease-in-out;
}

.awc-products-grid .button.awc-view-credentials-btn{
    background-color: transparent;
    color: var(--e-global-color-c4c9724);
    text-transform: uppercase;
    transition: all 0.3s ease-in-out;
    border: 0;
    font-size: 14px;
}

.awc-products-grid .button.awc-view-credentials-btn:hover{
    transition: all 0.3s ease-in-out;
    color: var(--e-global-color-primary);
}

/* ========================================
   MODAL STYLES
   ======================================== */

/* Modal principal */
.awc-modal {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    backdrop-filter: blur(0px);
    align-items: center;
    justify-content: center;
    display: flex;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

/* Modal visible */
.awc-modal.show {
    opacity: 1;
    visibility: visible;
    background-color: rgba(0,0,0,0.7);
    backdrop-filter: blur(2px);
    pointer-events: auto;
}

/* Contenido del modal */
.awc-modal-content {
    background-color: #ffffff;
    padding: 25px;
    border: 1px solid #dee2e6;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
    position: relative;
    transform: translateY(30px) scale(0.95);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Contenido del modal visible */
.awc-modal.show .awc-modal-content {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Estado inicial del modal (oculto) */
.awc-modal:not(.show) {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

.awc-modal:not(.show) .awc-modal-content {
    transform: translateY(30px) scale(0.95) !important;
    opacity: 0 !important;
}

/* Animación de entrada */
@keyframes modalFadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Animación de salida */
@keyframes modalFadeOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

/* Aplicar animaciones */
.awc-modal.show .awc-modal-content {
    animation: modalFadeInUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.awc-modal.hiding .awc-modal-content {
    animation: modalFadeOutDown 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Mejorar la transición del botón de cerrar */
.awc-modal-close {
    color: #6c757d;
    float: right;
    font-size: 32px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    position: absolute;
    top: 15px;
    right: 20px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
}

.awc-modal-close:hover {
    color: #dc3545;
    background: rgba(255,255,255,0.2);
    transform: scale(1.1);
}

/* Estilos de tipografía del modal */
.awc-modal .awc-product-title {
    font-size: 30px;
    font-family: var(--e-global-typography-primary-font-family);
}

.awc-modal-subtitle, 
.awc-credentials-table th, 
.awc-modal-footer p {
    font-family: var(--e-global-typography-primary-font-family);
}

/* Header del producto en el modal */
.awc-product-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.awc-product-image {
    flex-shrink: 0;
}

.awc-product-thumbnail {
    width: 300px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Contenido del modal de credenciales */
.awc-modal-credentials h3 {
    margin: 0 0 20px 0;
    color: #333;
    text-align: center;
    font-size: 1.5em;
    padding-right: 40px;
}

.awc-modal-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 25px;
    font-size: 1.1em;
}

.awc-modal-footer {
    margin-top: 25px;
    padding: 20px;
    background: #e3f2fd;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.awc-modal-footer p {
    margin: 0 0 8px 0;
    color: #1976d2;
}

.awc-modal-footer small {
    color: #6c757d;
    font-size: 0.9em;
}

/* Tabla de credenciales en el modal */
.awc-modal-credentials .awc-credentials-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.awc-modal-credentials .awc-credentials-table th {
    background: #f8f9fa;
    color: #495057;
    padding: 12px 8px;
    text-align: left;
    border: 1px solid #dee2e6;
    font-weight: 600;
}

.awc-modal-credentials .awc-credentials-table td {
    padding: 12px 8px;
    border: 1px solid #dee2e6;
    background: #fff;
}

.awc-modal-credentials .awc-credentials-table td:first-child,
.awc-modal-credentials .awc-credentials-table td:nth-child(2) {
    font-family: "Courier New", monospace;
    font-weight: 500;
}

/* ========================================
   CREDENCIALES EXPANDIBLES EN PEDIDOS
   ======================================== */

.awc-product-credentials-item {
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.awc-product-header {
    transition: background-color 0.2s ease;
}

.awc-product-header h4 {
    margin: 0;
    color: #495057;
    font-size: 1.1em;
}

.awc-toggle-icon {
    font-size: 18px;
    transition: transform 0.3s ease;
    color: #6c757d;
}

.awc-credentials-content {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #dee2e6;
}

/* ========================================
   RESPONSIVE STYLES
   ======================================== */

@media (max-width: 768px) {
    .awc-products-grid {
        grid-template-columns: 1fr;
    }
    
    .awc-modal-content {
        width: 95%;
    }
    
    .awc-product-actions {
        flex-direction: column;
    }
    
    .awc-product-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .awc-product-thumbnail {
        width: 200px;
    }
    
    .awc-product-title {
        font-size: 1.3em;
    }
    
    .awc-credentials-table {
        font-size: 14px;
    }
    
    .awc-credentials-table th,
    .awc-credentials-table td {
        padding: 8px 6px;
    }
}
