/**
 * MN Download Widget Styles
 * 
 * Provides styling for the MN Download widget with grid/list layouts
 * and light/dark theme support with hover animations
 */

/* Base Styles */
.mn-download-wrapper {
    width: 100%;
}

.mn-download-container {
    width: 100%;
}

/* Grid Layout */
.mn-download-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* List Layout */
.mn-download-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* Download Item Base */
.mn-download-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid transparent;
    background: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mn-download-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.mn-download-item-content {
    padding: 20px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Header */
.mn-download-item-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 15px;
}

.mn-download-item-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    font-size: 20px;
}

.mn-download-item-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    flex: 1;
}

/* Description */
.mn-download-item-description {
    margin-bottom: 20px;
    line-height: 1.6;
    flex: 1;
}

/* Footer */
.mn-download-item-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
}

.mn-download-item-meta {
    flex: 1;
}

.mn-download-item-type {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Download Button */
.mn-download-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

.mn-download-button:hover {
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.mn-download-button i {
    font-size: 16px;
}

/* Light Theme */
.mn-theme-light .mn-download-item {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mn-theme-light .mn-download-item-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.mn-theme-light .mn-download-item-title {
    color: #111827;
}

.mn-theme-light .mn-download-item-description {
    color: #6b7280;
}

.mn-theme-light .mn-download-item-type {
    background: #f3f4f6;
    color: #6b7280;
}

.mn-theme-light .mn-download-button {
    background: #3b82f6;
    color: #ffffff;
}

.mn-theme-light .mn-download-button:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Dark Theme */
.mn-theme-dark .mn-download-item {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.mn-theme-dark .mn-download-item-icon {
    background: #374151;
    color: #9ca3af;
}

.mn-theme-dark .mn-download-item-title {
    color: #f9fafb;
}

.mn-theme-dark .mn-download-item-description {
    color: #d1d5db;
}

.mn-theme-dark .mn-download-item-type {
    background: #374151;
    color: #9ca3af;
}

.mn-theme-dark .mn-download-button {
    background: #3b82f6;
    color: #ffffff;
}

.mn-theme-dark .mn-download-button:hover {
    background: #2563eb;
    color: #ffffff;
}

/* Hover Animations */
.mn-theme-light .mn-download-item:hover {
    background: #1f2937;
    border-color: #374151;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.mn-theme-light .mn-download-item:hover .mn-download-item-icon {
    background: #374151;
    color: #9ca3af;
}

.mn-theme-light .mn-download-item:hover .mn-download-item-title {
    color: #f9fafb;
}

.mn-theme-light .mn-download-item:hover .mn-download-item-description {
    color: #d1d5db;
}

.mn-theme-light .mn-download-item:hover .mn-download-item-type {
    background: #374151;
    color: #9ca3af;
}

.mn-theme-dark .mn-download-item:hover {
    background: #ffffff;
    border-color: #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.mn-theme-dark .mn-download-item:hover .mn-download-item-icon {
    background: #f3f4f6;
    color: #6b7280;
}

.mn-theme-dark .mn-download-item:hover .mn-download-item-title {
    color: #111827;
}

.mn-theme-dark .mn-download-item:hover .mn-download-item-description {
    color: #6b7280;
}

.mn-theme-dark .mn-download-item:hover .mn-download-item-type {
    background: #f3f4f6;
    color: #6b7280;
}

/* List Layout Specific */
.mn-layout-list .mn-download-item {
    border-radius: 6px;
}

.mn-layout-list .mn-download-item-content {
    padding: 15px 20px;
}

.mn-layout-list .mn-download-item-header {
    margin-bottom: 10px;
}

.mn-layout-list .mn-download-item-description {
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mn-download-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .mn-download-item-content {
        padding: 15px;
    }
    
    .mn-download-item-header {
        gap: 10px;
        margin-bottom: 10px;
    }
    
    .mn-download-item-icon {
        width: 35px;
        height: 35px;
        font-size: 18px;
    }
    
    .mn-download-item-title {
        font-size: 16px;
    }
    
    .mn-download-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .mn-download-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mn-download-list {
        gap: 10px;
    }
    
    .mn-download-item-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .mn-download-button {
        align-self: stretch;
        justify-content: center;
    }
}

/* Advanced Item Styling */
.mn-download-item {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.mn-download-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: inherit;
    transition: all 0.3s ease;
    z-index: -1;
}

.mn-download-item:hover::before {
    transform: scale(1.02);
}

/* Background Overlay Support */
.mn-download-item-content {
    position: relative;
    z-index: 1;
}

/* Enhanced Border Transitions */
.mn-download-item {
    border-style: solid;
    border-width: 1px;
    border-color: transparent;
}

.mn-download-item:hover {
    border-color: inherit;
}

/* Box Shadow Transitions */
.mn-download-item {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Print Styles */
@media print {
    .mn-download-wrapper {
        background: white !important;
        color: black !important;
    }
    
    .mn-download-item {
        background: white !important;
        border: 1px solid #ccc !important;
        box-shadow: none !important;
        break-inside: avoid;
        margin-bottom: 10px;
    }
    
    .mn-download-button {
        display: none !important;
    }
}
