/**
 * WP Download Counter Module - Main Styles
 * 
 * @package WPDownloadCounter
 */

/* Base download counter styles */
.wp-download-counter-button,
.wp-download-counter-list,
.wp-download-counter-stats,
.wp-download-counter-display {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.5;
}

/* Download Button Styles */
.wp-download-counter-button {
    margin: 1rem 0;
}

.wdc-button {
    display: inline-block;
    padding: 0.75em 1.5em;
    text-decoration: none;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    font-size: 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    position: relative;
    overflow: hidden;
}

.wdc-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.wdc-button:hover::before {
    width: 300px;
    height: 300px;
}

/* Button Style Variants */
.wdc-style-default {
    background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
    color: white;
}

.wdc-style-default:hover {
    background: linear-gradient(135deg, #005a87 0%, #004055 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.wdc-style-outlined {
    background: transparent;
    color: #0073aa;
    border: 2px solid #0073aa;
    box-shadow: none;
}

.wdc-style-outlined:hover {
    background: #0073aa;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 115, 170, 0.3);
}

.wdc-style-filled {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    border: none;
}

.wdc-style-filled:hover {
    background: linear-gradient(135deg, #218838 0%, #1ea085 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Download Count and Meta Information */
.wdc-count,
.wdc-version,
.wdc-size {
    display: inline-block;
    font-size: 0.875em;
    color: #6c757d;
    margin-left: 0.5em;
    opacity: 0.9;
    transition: opacity 0.2s ease;
}

.wdc-count:hover,
.wdc-version:hover,
.wdc-size:hover {
    opacity: 1;
}

.wdc-count {
    background: #e9ecef;
    padding: 0.2em 0.5em;
    border-radius: 12px;
    font-weight: 500;
}

/* Download List Styles */
.wp-download-counter-list {
    margin: 1.5rem 0;
}

.wdc-download-list {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.wdc-download-item {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background-color 0.2s ease;
}

.wdc-download-item:last-child {
    border-bottom: none;
}

.wdc-download-item:hover {
    background-color: #f8f9fa;
}

.wdc-download-link {
    flex: 1;
    color: #0073aa;
    text-decoration: none;
    font-weight: 500;
    margin-right: 1rem;
    transition: color 0.2s ease;
}

.wdc-download-link:hover {
    color: #005a87;
    text-decoration: underline;
}

.wdc-download-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.875em;
}

/* Download Stats Styles */
.wp-download-counter-stats {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
    margin: 1.5rem 0;
}

.wdc-stat-item {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.wdc-stat-item:last-child {
    margin-bottom: 0;
}

.wdc-stat-item strong {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

/* Download Counter Display */
.wp-download-counter-display {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.wdc-count-number {
    background: #0073aa;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    min-width: 2rem;
    text-align: center;
}

/* Utility Classes */
.wdc-placeholder {
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    color: #6c757d;
    font-style: italic;
}

.wdc-copied-message {
    background: #28a745;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    margin-left: 0.5rem;
    animation: fadeInOut 2s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wdc-button {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .wdc-download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    
    .wdc-download-link {
        margin-right: 0;
    }
    
    .wdc-download-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .wp-download-counter-stats {
        padding: 1.5rem;
    }
    
    .wdc-stat-item strong {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .wdc-button {
        padding: 1rem;
        font-size: 14px;
    }
    
    .wdc-download-item {
        padding: 0.75rem 1rem;
    }
    
    .wp-download-counter-stats {
        padding: 1rem;
    }
}

/* Animation */
@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-10px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-10px); }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wdc-download-list {
        background: #2d3748;
        color: #e2e8f0;
    }
    
    .wdc-download-item {
        border-bottom-color: #4a5568;
    }
    
    .wdc-download-item:hover {
        background-color: #4a5568;
    }
    
    .wdc-placeholder {
        background-color: #4a5568;
        border-color: #718096;
        color: #a0aec0;
    }
    
    .wdc-count,
    .wdc-version,
    .wdc-size {
        color: #a0aec0;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .wdc-button {
        border: 2px solid;
    }
    
    .wdc-style-outlined {
        border-width: 3px;
    }
    
    .wdc-count-number {
        border: 1px solid currentColor;
    }
}