/* Estilos para Badges de Cupom - Trudes TI */

/* Badge de Cupom Geral */
.trudes-coupon-badge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.2);
    max-width: 200px;
    position: relative;
    z-index: 100;
}

.trudes-coupon-badge .coupon-icon {
    font-size: 16px;
    margin-right: 8px;
    display: inline-block;
}

.trudes-coupon-badge .coupon-text {
    display: inline-block;
    vertical-align: middle;
}

.trudes-coupon-badge .coupon-text strong {
    display: block;
    font-size: 14px;
    margin-bottom: 2px;
}

.trudes-coupon-badge .coupon-text small {
    font-size: 10px;
    opacity: 0.9;
}

.trudes-coupon-badge .coupon-info-btn {
    position: absolute;
    top: -8px;
    right: -8px;
    width: 24px;
    height: 24px;
    background: #fff;
    border: 2px solid #ff6b6b;
    border-radius: 50%;
    color: #ff6b6b;
    font-size: 12px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.trudes-coupon-badge .coupon-info-btn:hover {
    background: #ff6b6b;
    color: white;
    transform: scale(1.1);
}

/* Badge de Cupom na Página do Produto */
.trudes-coupon-badge-single {
    margin: 15px 0;
    text-align: center;
}

.trudes-coupon-badge-single .trudes-coupon-badge {
    display: inline-block;
    margin: 0 auto;
}

/* Responsividade */
@media (max-width: 768px) {
    .trudes_ti_card_image .trudes-coupon-badge {
        max-width: 150px;
        font-size: 10px;
        padding: 6px 10px;
    }
    
    .trudes_ti_card_image .trudes-coupon-badge .coupon-text strong {
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    .trudes_ti_card_image .trudes-coupon-badge {
        max-width: 130px;
        font-size: 9px;
        padding: 5px 8px;
        top: 5px !important;
        left: 5px !important;
    }
    
    .trudes_ti_card_image .trudes-coupon-badge .coupon-text strong {
        font-size: 10px;
    }
}

/* Popup de Cupom */
.trudes-coupon-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coupon-popup-content {
    background: white;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.coupon-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    border-bottom: 1px solid #eee;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border-radius: 12px 12px 0 0;
}

.coupon-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.coupon-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.coupon-popup-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.coupon-popup-body {
    padding: 25px;
}

.coupon-popup-loading {
    text-align: center;
    padding: 40px 20px;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #ff6b6b;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.coupon-popup-error {
    text-align: center;
    padding: 40px 20px;
    color: #e74c3c;
}

/* Estilos para o código do cupom */
.coupon-code {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    padding: 10px 15px;
    border-radius: 6px;
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 15px 0;
}

.coupon-code:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: scale(1.02);
}

.coupon-code.copied {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

/* Detalhes do cupom */
.coupon-details {
    margin-top: 20px;
}

.coupon-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.coupon-detail-item:last-child {
    border-bottom: none;
}

.coupon-detail-label {
    font-weight: 600;
    color: #495057;
}

.coupon-detail-value {
    color: #6c757d;
    text-align: right;
}

.coupon-description {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
    border-left: 4px solid #ff6b6b;
}

.coupon-usage-info {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 6px;
    margin: 15px 0;
}
