/**
 * Client Downloads CSS
 * 
 * @package     Connect E-Commerce
 * @subpackage  Assets/CSS
 * @category    Client Downloads
 * @version     1.8.0
 * @since       Version 1.8.0
 */

/* ==============================================================
   PÁGINA DE DOWNLOADS
   ============================================================== */

.page-header-custom {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.page-header-custom h2 {
    color: white;
    font-weight: 600;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.page-header-custom .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.page-header-custom .btn-default {
    background: white;
    color: #667eea;
    border: none;
    font-weight: 500;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.page-header-custom .btn-default:hover {
    background: rgba(255,255,255,0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* ==============================================================
   CONTAINER DE DOWNLOADS
   ============================================================== */

.downloads-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

/* ==============================================================
   ITEM DE DOWNLOAD
   ============================================================== */

.download-item {
    margin-bottom: 15px;
    transition: all 0.3s ease;
    border-left: 4px solid #16A34A;
    background: white;
    overflow: hidden;
}

.download-item:hover {
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
    transform: translateY(-3px);
    border-left-color: #0f7c35;
}

.download-item .panel-body {
    padding: 20px;
}

.download-item h4 {
    color: #333;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 18px;
}

.download-item h4 .label {
    font-size: 11px;
    padding: 4px 8px;
    vertical-align: middle;
    margin-left: 8px;
}

.download-item .text-muted {
    color: #666;
    font-size: 14px;
    margin-bottom: 12px;
}

/* ==============================================================
   INFORMAÇÕES DE DOWNLOAD
   ============================================================== */

.download-info {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.download-info small {
    display: inline-flex;
    align-items: center;
    font-size: 13px;
    padding: 4px 10px;
    background: #f8f9fa;
    border-radius: 4px;
}

.download-info small i {
    margin-right: 6px;
}

/* ==============================================================
   BOTÃO DE DOWNLOAD
   ============================================================== */

.btn-download-product {
    padding: 12px 30px;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #16A34A 0%, #0f7c35 100%);
    border: none;
    color: white;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.3);
}

.btn-download-product:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(22, 163, 74, 0.4);
    background: linear-gradient(135deg, #0f7c35 0%, #16A34A 100%);
    color: white;
}

.btn-download-product i {
    margin-right: 8px;
}

.btn-download-product:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(22, 163, 74, 0.3);
}

/* ==============================================================
   BADGES DE STATUS
   ============================================================== */

.label-success {
    background-color: #16A34A;
}

.label-danger {
    background-color: #dc3545;
}

.label-warning {
    background-color: #ffc107;
    color: #333;
}

.label-info {
    background-color: #17a2b8;
}

/* ==============================================================
   FAQ SECTION
   ============================================================== */

.faq-item {
    padding: 15px 0;
}

.faq-item h5 {
    color: #333;
    margin-bottom: 10px;
    font-size: 16px;
}

.faq-item p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 0;
    font-size: 14px;
}

/* ==============================================================
   MODAL DE DOWNLOAD
   ============================================================== */

#download-modal .modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 6px 6px 0 0;
}

#download-modal .modal-title {
    font-weight: 600;
}

#download-modal .modal-header .close {
    color: white;
    opacity: 0.8;
}

#download-modal .modal-header .close:hover {
    opacity: 1;
}

#download-modal .file-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
}

#download-modal .file-info p {
    margin-bottom: 8px;
    color: #555;
}

#download-modal .file-info p:last-child {
    margin-bottom: 0;
}

#download-modal .download-terms {
    background: #fff9e6;
    padding: 15px;
    border-radius: 6px;
    border-left: 4px solid #ffc107;
}

#download-modal .download-terms h5 {
    color: #333;
    margin-bottom: 12px;
    font-size: 15px;
}

#download-modal .download-terms p {
    color: #666;
    line-height: 1.6;
    font-size: 13px;
}

#download-modal .checkbox label {
    font-weight: 500;
    color: #333;
    cursor: pointer;
}

/* ==============================================================
   BADGE DE PRODUTO DIGITAL (DETALHES)
   ============================================================== */

.digital-product-badge {
    animation: fadeInDown 0.5s ease;
}

.digital-product-badge .label {
    display: inline-flex;
    align-items: center;
    animation: pulse 2s ease infinite;
}

.digital-product-badge .label i {
    margin-right: 6px;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

/* ==============================================================
   ALERTAS PERSONALIZADOS
   ============================================================== */

.alert-info {
    background-color: #e3f2fd;
    border-color: #90caf9;
    color: #0d47a1;
}

.alert-info ul {
    margin-bottom: 0;
    padding-left: 20px;
}

.alert-info li {
    margin-bottom: 5px;
}

.alert-info li:last-child {
    margin-bottom: 0;
}

/* ==============================================================
   LOADING STATES
   ============================================================== */

.loading-downloads {
    text-align: center;
    padding: 60px 20px;
}

.loading-downloads i {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 15px;
}

.loading-downloads p {
    color: #999;
    font-size: 16px;
}

/* ==============================================================
   EMPTY STATE
   ============================================================== */

.no-downloads-message {
    text-align: center;
    padding: 80px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.no-downloads-message i {
    font-size: 64px;
    color: #ddd;
    margin-bottom: 20px;
}

.no-downloads-message h3 {
    color: #666;
    font-weight: 600;
    margin-bottom: 10px;
}

.no-downloads-message p {
    color: #999;
    font-size: 15px;
}

/* ==============================================================
   RESPONSIVIDADE
   ============================================================== */

@media (max-width: 768px) {
    .page-header-custom {
        padding: 20px;
    }
    
    .page-header-custom h2 {
        font-size: 24px;
    }
    
    .page-header-custom .col-md-4 {
        text-align: left !important;
        margin-top: 15px;
    }
    
    .downloads-container {
        padding: 15px;
    }
    
    .download-item .panel-body {
        padding: 15px;
    }
    
    .download-item h4 {
        font-size: 16px;
    }
    
    .download-item .col-md-4 {
        text-align: left !important;
        margin-top: 15px;
    }
    
    .download-info {
        flex-direction: column;
        gap: 8px;
    }
    
    .btn-download-product {
        width: 100%;
        padding: 10px 20px;
    }
    
    .digital-product-badge {
        margin: 10px 0 !important;
    }
    
    .digital-product-badge .label {
        display: block;
        margin-bottom: 5px;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .page-header-custom h2 {
        font-size: 20px;
    }
    
    .download-item h4 {
        font-size: 15px;
    }
    
    .faq-item h5 {
        font-size: 14px;
    }
}

/* ==============================================================
   ANIMAÇÕES DE ENTRADA
   ============================================================== */

.download-item {
    animation: slideInUp 0.4s ease;
    animation-fill-mode: both;
}

.download-item:nth-child(1) { animation-delay: 0.1s; }
.download-item:nth-child(2) { animation-delay: 0.2s; }
.download-item:nth-child(3) { animation-delay: 0.3s; }
.download-item:nth-child(4) { animation-delay: 0.4s; }
.download-item:nth-child(5) { animation-delay: 0.5s; }

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==============================================================
   TOOLTIPS E HINTS
   ============================================================== */

.hint-text {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.hint-text i {
    margin-right: 4px;
}

/* ==============================================================
   PROGRESS BARS (para download progress futuro)
   ============================================================== */

.download-progress {
    margin-top: 10px;
}

.download-progress .progress {
    height: 8px;
    background-color: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
}

.download-progress .progress-bar {
    background: linear-gradient(90deg, #16A34A 0%, #0f7c35 100%);
    transition: width 0.3s ease;
}

.download-progress-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
}

/* ==============================================================
   BADGES DE STATUS ADICIONAIS
   ============================================================== */

.download-status-badge.revoked {
    background: rgba(220, 38, 38, 0.1);
    color: #DC2626;
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.download-item[data-status="revoked"] {
    border-left-color: #DC2626;
    opacity: 0.85;
}

.download-item[data-status="expired"] {
    border-left-color: #EF4444;
    opacity: 0.85;
}

.download-item[data-status="limited"] {
    border-left-color: #F59E0B;
    opacity: 0.85;
}

/* Mensagens de erro/negação */
.text-danger {
    color: #DC2626 !important;
}

.download-counter.text-danger {
    color: #DC2626 !important;
    font-weight: 600;
}

/* Botões desabilitados */
.btn-download-product:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-download-product.btn-danger:disabled {
    background: linear-gradient(135deg, #EF4444, #DC2626);
}

.btn-download-product:disabled:hover {
    transform: none;
    box-shadow: none;
}
