/**
 * Token Payment Styles
 * 
 * @package WP_Tokenizar_Usuarios
 * @subpackage Herramientas
 * @version 1.0.0.0
 * @author Miguel Carreño
 * @copyright 2025 Miguel Carreño
 */

/* ===== MODAL DE CONFIRMACIÓN ===== */
.wtu-token-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wtu-token-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    animation: fadeIn 0.2s ease;
}

.wtu-token-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
    overflow: hidden;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wtu-token-modal-header {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    padding: 20px 25px;
    border-bottom: 2px solid #f0c000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.wtu-token-modal-icon {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #333;
}

.wtu-token-modal-title {
    margin: 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.wtu-token-modal-body {
    padding: 25px;
}

.wtu-token-modal-message {
    font-size: 16px;
    color: #333;
    margin: 0 0 20px 0;
    line-height: 1.6;
}

.wtu-token-modal-details {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 15px;
    border: 1px solid #e0e0e0;
}

.wtu-token-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #e0e0e0;
}

.wtu-token-detail-row:last-child {
    border-bottom: none;
}

.wtu-new-balance-row {
    margin-top: 10px;
    padding-top: 15px;
    border-top: 2px solid #ffd700;
    font-weight: 600;
}

.wtu-token-detail-label {
    color: #666;
    font-weight: 500;
}

.wtu-token-detail-value {
    color: #333;
    font-weight: 600;
}

.wtu-token-modal-footer {
    padding: 20px 25px;
    background: #f5f5f5;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    border-top: 1px solid #e0e0e0;
}

.wtu-token-modal-cancel {
    padding: 10px 20px;
}

.wtu-token-modal-confirm {
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-color: #ffd700;
    color: #333;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: 600;
}

.wtu-token-modal-confirm:hover {
    background: linear-gradient(135deg, #ffed4e 0%, #ffd700 100%);
    border-color: #f0c000;
    transform: translateY(-1px);
}

.wtu-token-modal-confirm .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

body.wtu-modal-open {
    overflow: hidden;
}

/* ===== PRECIO EN TOKENS ===== */
.wtu-token-price-display {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border-radius: 20px;
    font-weight: 600;
    color: #333;
    font-size: 16px;
    margin-top: 5px;
}

.wtu-token-price-display .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* Badge clickeable para compra directa */
.wtu-token-badge.wtu-buy-with-tokens-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.wtu-token-badge.wtu-buy-with-tokens-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 215, 0, 0.5);
    filter: brightness(1.1);
}

.wtu-token-badge.wtu-buy-with-tokens-btn:active {
    transform: translateY(0) scale(0.98);
}

.wtu-token-purchase-section {
    animation: fadeInUp 0.3s ease-in-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.wtu-buy-with-tokens-btn {
    transition: all 0.3s ease;
    font-weight: 600;
}

.wtu-buy-with-tokens-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.4);
}

.wtu-buy-with-tokens-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wtu-insufficient-tokens {
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.wtu-checkout-token-payment {
    animation: slideIn 0.4s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .wtu-token-modal-content {
        width: 95%;
        max-width: none;
    }
    
    .wtu-token-modal-header {
        padding: 15px 20px;
    }
    
    .wtu-token-modal-body {
        padding: 20px;
    }
    
    .wtu-token-modal-footer {
        flex-direction: column;
    }
    
    .wtu-token-modal-cancel,
    .wtu-token-modal-confirm {
        width: 100%;
        justify-content: center;
    }
    
    .wtu-token-purchase-section {
        padding: 12px !important;
    }
    
    .wtu-token-price-display {
        font-size: 14px;
    }
    
    .wtu-buy-with-tokens-btn {
        font-size: 14px;
        padding: 10px 15px;
    }
}
