/**
 * Download Box for WooCommerce - Styles Frontend
 * Version: 1.0.0
 */

.dbwc-download-box {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    border-radius: 16px;
    padding: 32px;
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.dbwc-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.dbwc-icon {
    background: #3498db;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.dbwc-title {
    color: #ffffff;
    font-size: 24px;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.5px;
}

.dbwc-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.dbwc-info-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dbwc-label {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    font-weight: 500;
    text-transform: lowercase;
    letter-spacing: 0.5px;
}

.dbwc-value {
    color: #ffffff;
    font-size: 16px;
    font-weight: 600;
}

.dbwc-report-link {
    color: #e74c3c;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.3s ease;
}

.dbwc-report-link:hover {
    color: #c0392b;
    gap: 8px;
}

.dbwc-report-link svg {
    width: 16px;
    height: 16px;
}

.dbwc-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.dbwc-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 16px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    text-align: center;
}

.dbwc-btn-primary {
    background: #3498db;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.dbwc-btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
    color: #ffffff;
}

.dbwc-btn-secondary {
    background: #e74c3c;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(231, 76, 60, 0.3);
}

.dbwc-btn-secondary:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.4);
    color: #ffffff;
}

.dbwc-btn svg {
    width: 16px;
    height: 16px;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .dbwc-download-box {
        padding: 24px;
        margin: 30px 0;
    }
    
    .dbwc-title {
        font-size: 20px;
    }
    
    .dbwc-info-grid {
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    
    .dbwc-buttons {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .dbwc-download-box {
        padding: 20px;
    }
    
    .dbwc-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .dbwc-info-grid {
        grid-template-columns: 1fr;
    }
    
    .dbwc-btn {
        padding: 14px 24px;
        font-size: 14px;
    }
}

/* Animation d'apparition */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dbwc-download-box {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== MODAL DE SIGNALEMENT ==================== */

.dbwc-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.dbwc-modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    position: relative;
    animation: slideDown 0.3s ease;
}

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

.dbwc-modal-close {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    transition: color 0.2s;
}

.dbwc-modal-close:hover {
    color: #000;
}

.dbwc-modal-content h2 {
    margin-top: 0;
    margin-bottom: 20px;
    color: #333;
}

.dbwc-modal-content label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.dbwc-input,
.dbwc-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.dbwc-input:focus,
.dbwc-textarea:focus {
    outline: none;
    border-color: #3498db;
}

.dbwc-form-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.dbwc-form-message {
    padding: 10px;
    border-radius: 4px;
    margin-top: 15px;
    text-align: center;
}

.dbwc-form-message.dbwc-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.dbwc-form-message.dbwc-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

@media (max-width: 600px) {
    .dbwc-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .dbwc-form-buttons {
        flex-direction: column;
    }
    
    .dbwc-form-buttons .dbwc-btn {
        width: 100%;
    }
}

/* ==================== CHANGELOG MODAL ==================== */

.dbwc-changelog-content {
    max-width: 700px;
    max-height: 80vh;
    overflow-y: auto;
}

.dbwc-version-entry {
    border-left: 3px solid #3498db;
    padding-left: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.dbwc-version-entry:last-child {
    border-bottom: none;
}

.dbwc-version-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.dbwc-version-header strong {
    font-size: 16px;
    color: #333;
}

.dbwc-current-tag {
    background: #46b450;
    color: #fff;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: 600;
}

.dbwc-version-date {
    color: #666;
    font-size: 13px;
    margin-left: auto;
}

.dbwc-version-changelog {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
    font-size: 14px;
}

.dbwc-changelog-link {
    opacity: 0.8;
    transition: opacity 0.2s;
}

.dbwc-changelog-link:hover {
    opacity: 1;
}

/* ==================== BUTTON CURSOR ==================== */

.dbwc-btn {
    cursor: pointer;
    border: none;
    outline: none;
}

.dbwc-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 2px;
}

/* ==================== SOCIAL PROOF - BADGE ==================== */

.dbwc-badge {
    position: absolute !important;
    top: 20px !important;
    right: 15px !important;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    z-index: 10 !important;
    animation: slideInRight 0.5s ease;
 
          
         
           
}

.dbwc-badge-popular {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}

.dbwc-badge-trending {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: #fff;
}

.dbwc-badge-new {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}

.dbwc-badge-updated {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #fff;
}

.dbwc-badge-bestseller {
    background: linear-gradient(135deg, #ffd89b 0%, #19547b 100%);
    color: #fff;
}

@keyframes slideInRight {
    from {
        transform: translateX(50px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ==================== SOCIAL PROOF - RATING ==================== */

.dbwc-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    animation: fadeIn 0.6s ease;
}

.dbwc-star {
    font-size: 16px;
    line-height: 1;
}

.dbwc-star-full {
    filter: drop-shadow(0 0 2px rgba(255, 215, 0, 0.5));
}

.dbwc-star-empty {
    opacity: 0.3;
}

.dbwc-rating-value {
    margin-left: 6px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0.9;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ==================== SOCIAL PROOF - DOWNLOAD STATS ==================== */

.dbwc-download-stats {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.dbwc-stat-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    opacity: 0.9;
}

.dbwc-stat-item svg {
    opacity: 0.7;
}

.dbwc-stat-item strong {
    font-weight: 700;
    color: #fff;
}

.dbwc-stat-today {
    color: #4facfe;
}

.dbwc-stat-today strong {
    color: #4facfe;
}

.dbwc-stat-today svg {
    stroke: #4facfe;
}

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

@media (max-width: 600px) {
    .dbwc-badge {
        top: 10px;
        right: 10px;
        font-size: 11px;
        padding: 4px 10px;
    }
    
    .dbwc-rating {
        flex-wrap: wrap;
    }
    
    .dbwc-star {
        font-size: 14px;
    }
    
    .dbwc-download-stats {
        flex-direction: column;
        gap: 10px;
    }
}

/* ==================== TOAST NOTIFICATIONS ==================== */

.dbwc-toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 400px;
}

.dbwc-toast {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    border-left: 4px solid #3498db;
}

.dbwc-toast-show {
    transform: translateX(0);
    opacity: 1;
}

.dbwc-toast-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 16px;
    color: #fff;
}

.dbwc-toast-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}

.dbwc-toast-close {
    flex-shrink: 0;
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

.dbwc-toast-close:hover {
    background: rgba(0, 0, 0, 0.05);
    color: #333;
}

/* Types de toast */

.dbwc-toast-success {
    border-left-color: #46b450;
}

.dbwc-toast-success .dbwc-toast-icon {
    background: #46b450;
}

.dbwc-toast-error {
    border-left-color: #dc3232;
}

.dbwc-toast-error .dbwc-toast-icon {
    background: #dc3232;
}

.dbwc-toast-warning {
    border-left-color: #ffb900;
}

.dbwc-toast-warning .dbwc-toast-icon {
    background: #ffb900;
    color: #000;
}

.dbwc-toast-info {
    border-left-color: #3498db;
}

.dbwc-toast-info .dbwc-toast-icon {
    background: #3498db;
}

/* Responsive */

@media (max-width: 600px) {
    .dbwc-toast-container {
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .dbwc-toast {
        transform: translateY(-100px);
    }
    
    .dbwc-toast-show {
        transform: translateY(0);
    }
}


/* ==================== DARK THEME (DEFAULT) ==================== */
.dbwc-theme-dark.dbwc-download-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.dbwc-theme-dark .dbwc-header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
}

.dbwc-theme-dark .dbwc-title,
.dbwc-theme-dark .dbwc-value {
    color: #ffffff;
}

.dbwc-theme-dark .dbwc-label {
    color: rgba(255, 255, 255, 0.7);
}

.dbwc-theme-dark .dbwc-info-grid {
    border-top-color: rgba(255, 255, 255, 0.1);
}

.dbwc-theme-dark .dbwc-report-link,
.dbwc-theme-dark .dbwc-changelog-link {
    color: #00d4aa;
}

.dbwc-theme-dark .dbwc-btn-primary {
    background: linear-gradient(135deg, #00d4aa 0%, #00b894 100%);
    color: #fff;
}

.dbwc-theme-dark .dbwc-btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}



/* ==================== LIGHT THEME ==================== */
body .dbwc-download-box.dbwc-theme-light {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%) !important;
    color: #2c3e50 !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1) !important;
}

body .dbwc-theme-light .dbwc-header {
    border-bottom-color: rgba(44, 62, 80, 0.1) !important;
}

body .dbwc-theme-light .dbwc-title,
body .dbwc-theme-light .dbwc-value {
    color: #2c3e50 !important;
}

body .dbwc-theme-light .dbwc-label {
    color: #7f8c8d !important;
}

body .dbwc-theme-light .dbwc-info-grid {
    border-top-color: rgba(44, 62, 80, 0.1) !important;
}

body .dbwc-theme-light .dbwc-report-link,
body .dbwc-theme-light .dbwc-changelog-link {
    color: #2980b9 !important;
}

.dbwc-theme-light .dbwc-report-link:hover,
.dbwc-theme-light .dbwc-changelog-link:hover {
    color: #3498db !important;
}

.dbwc-theme-light .dbwc-report-link svg,
.dbwc-theme-light .dbwc-changelog-link svg {
    stroke: #2980b9;
}

.dbwc-theme-light .dbwc-btn-primary {
    background: #2980b9 !important;
    box-shadow: 0 4px 12px rgba(41, 128, 185, 0.3);
}

.dbwc-theme-light .dbwc-btn-primary:hover {
    background: #3498db !important;
    box-shadow: 0 6px 16px rgba(41, 128, 185, 0.4);
}

.dbwc-theme-light .dbwc-btn-secondary {
    background: #e67e22 !important;
    box-shadow: 0 4px 12px rgba(230, 126, 34, 0.3);
}

.dbwc-theme-light .dbwc-btn-secondary:hover {
    background: #d35400 !important;
    box-shadow: 0 6px 16px rgba(230, 126, 34, 0.4);
}

.dbwc-theme-light .dbwc-download-stats {
    border-top-color: rgba(44, 62, 80, 0.1);
}

.dbwc-theme-light .dbwc-stat-item {
    color: #34495e;
}

.dbwc-theme-light .dbwc-stat-item strong {
    color: #2c3e50;
}

.dbwc-theme-light .dbwc-stat-item svg {
    stroke: #7f8c8d;
}

.dbwc-theme-light .dbwc-stat-today {
    color: #2980b9 !important;
}

.dbwc-theme-light .dbwc-stat-today strong {
    color: #2980b9 !important;
}

.dbwc-theme-light .dbwc-stat-today svg {
    stroke: #2980b9 !important;
}

.dbwc-theme-light .dbwc-rating-value {
    color: #2c3e50;
}

/* Icon pour le thème light */
.dbwc-theme-light .dbwc-icon {
    background: rgba(41, 128, 185, 0.1);
}

.dbwc-theme-light .dbwc-icon svg path {
    stroke: #2980b9;
}
