/**
 * Link Exchange - Frontend Styles
 */

/* Container */
.dle-links-container {
    margin: 20px 0;
    padding: 0;
}

/* List Style */
.dle-links-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.dle-links-list li {
    margin-bottom: 12px;
    padding: 12px 15px;
    background: #f9fafb;
    border-left: 3px solid #667eea;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.dle-links-list li:hover {
    background: #ffffff;
    border-left-color: #764ba2;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.dle-links-list li a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    font-size: 15px;
    display: block;
}

.dle-links-list li a:hover {
    color: #667eea;
}

/* Grid Style */
.dle-links-grid,
.dle-widget-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.dle-link-item {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.dle-link-item:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-3px);
}

.dle-link-item a {
    text-decoration: none;
    color: #1f2937;
    font-weight: 600;
    font-size: 14px;
}

.dle-link-item a:hover {
    color: #667eea;
}

/* Widget Styles */
.widget .dle-widget-links {
    margin-top: 15px;
}

.widget .dle-links-list li {
    font-size: 14px;
    padding: 10px 12px;
    margin-bottom: 8px;
}

.widget .dle-widget-grid {
    grid-template-columns: 1fr;
}

/* Block Editor Preview */
.dle-block-preview {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    background: #f9fafb;
}

.dle-block-preview h3 {
    margin-top: 0;
    color: #1f2937;
    border-bottom: 2px solid #667eea;
    padding-bottom: 10px;
}

/* Cards Layout */
.dle-links-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.dle-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 25px;
    transition: all 0.3s ease;
}

.dle-card:hover {
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

.dle-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #1f2937;
}

.dle-card-description {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 15px 0;
}

.dle-card-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.dle-card-link:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Minimal Style */
.dle-links-minimal {
    border-top: 1px solid #e5e7eb;
    padding-top: 20px;
}

.dle-links-minimal .dle-link-item {
    border: none;
    padding: 8px 0;
    background: transparent;
    text-align: left;
    box-shadow: none;
}

.dle-links-minimal .dle-link-item:hover {
    background: transparent;
    transform: none;
}

.dle-links-minimal .dle-link-item a {
    color: #667eea;
    border-bottom: 1px dashed #667eea;
    padding-bottom: 2px;
}

.dle-links-minimal .dle-link-item a:hover {
    border-bottom-style: solid;
}

/* Compact Style */
.dle-links-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.dle-links-compact .dle-link-item {
    padding: 8px 16px;
    background: #f3f4f6;
    border: none;
    border-radius: 20px;
    display: inline-block;
}

.dle-links-compact .dle-link-item:hover {
    background: #667eea;
    transform: none;
}

.dle-links-compact .dle-link-item:hover a {
    color: #ffffff;
}

/* No Links Message */
.dle-no-links {
    text-align: center;
    color: #9ca3af;
    font-style: italic;
    padding: 30px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px dashed #d1d5db;
}

/* Loading State */
.dle-loading {
    text-align: center;
    padding: 30px;
}

.dle-loading:after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #667eea;
    animation: dle-spin 1s ease-in-out infinite;
}

@keyframes dle-spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .dle-links-grid,
    .dle-links-cards {
        grid-template-columns: 1fr;
    }
    
    .dle-links-compact {
        flex-direction: column;
    }
    
    .dle-links-list li {
        font-size: 14px;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .dle-links-list li {
        background: #1f2937;
        border-left-color: #667eea;
    }
    
    .dle-links-list li:hover {
        background: #111827;
    }
    
    .dle-links-list li a,
    .dle-link-item a {
        color: #f9fafb;
    }
    
    .dle-link-item {
        background: #1f2937;
        border-color: #374151;
    }
    
    .dle-card {
        background: #1f2937;
        border-color: #374151;
    }
}

/* Print Styles */
@media print {
    .dle-links-container {
        display: none;
    }
}
