/**
 * استایل‌های ویجت لینک‌های مرتبط
 * Pillar Cluster Manager Widget Styles
 */

/* ========== استایل‌های عمومی ========== */
.pcm-widget {
    margin: 40px 0;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.pcm-widget-header {
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.pcm-widget-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pcm-widget-title .pcm-icon {
    font-size: 28px;
}

.pcm-widget-subtitle {
    margin: 10px 0 0 0;
    font-size: 14px;
    color: #7f8c8d;
}

.pcm-widget-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
}

.pcm-powered {
    font-size: 11px;
    color: #95a5a6;
    font-style: italic;
}

/* ========== Template: Default ========== */
.pcm-widget-default .pcm-related-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pcm-widget-default .pcm-related-item {
    margin-bottom: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
}

.pcm-widget-default .pcm-related-item:hover {
    background: #e8f4f8;
    border-left-color: #2980b9;
    transform: translateX(5px);
}

.pcm-widget-default .pcm-related-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: #2c3e50;
    font-weight: 500;
    font-size: 16px;
}

.pcm-widget-default .pcm-link-icon {
    font-size: 18px;
    color: #3498db;
}

.pcm-widget-default .pcm-related-link:hover {
    color: #2980b9;
}

.pcm-widget-default .pcm-link-metrics {
    display: flex;
    gap: 15px;
    margin-top: 8px;
    font-size: 12px;
    color: #7f8c8d;
}

.pcm-widget-default .pcm-metric {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ========== Template: Card ========== */
.pcm-widget-card .pcm-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.pcm-widget-card .pcm-card-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pcm-widget-card .pcm-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.4);
}

.pcm-widget-card .pcm-card-link {
    display: block;
    padding: 20px;
    text-decoration: none;
    color: #ffffff;
}

.pcm-widget-card .pcm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.pcm-widget-card .pcm-card-badge {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.2);
}

.pcm-widget-card .pcm-similarity-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(255, 255, 255, 0.3);
}

.pcm-widget-card .pcm-card-title {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
    color: #ffffff;
}

.pcm-widget-card .pcm-anchor-text {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.pcm-widget-card .pcm-anchor-label {
    opacity: 0.7;
    margin-left: 5px;
}

.pcm-widget-card .pcm-card-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.pcm-widget-card .pcm-metrics-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
}

.pcm-widget-card .pcm-metric-label {
    display: block;
    opacity: 0.7;
    margin-bottom: 2px;
}

/* ========== Template: List ========== */
.pcm-widget-list .pcm-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pcm-widget-list .pcm-list-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.pcm-widget-list .pcm-list-item:hover {
    background: #fff;
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.15);
}

.pcm-widget-list .pcm-list-number {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: #fff;
    font-weight: 700;
    border-radius: 50%;
    font-size: 18px;
    flex-shrink: 0;
}

.pcm-widget-list .pcm-list-content {
    flex: 1;
}

.pcm-widget-list .pcm-list-link {
    text-decoration: none;
}

.pcm-widget-list .pcm-list-title {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.pcm-widget-list .pcm-list-anchor {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 6px;
}

.pcm-widget-list .pcm-list-metrics {
    margin-top: 8px;
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #95a5a6;
}

.pcm-widget-list .pcm-list-arrow {
    font-size: 24px;
    color: #3498db;
    flex-shrink: 0;
}

/* ========== Template: Minimal ========== */
.pcm-widget-minimal {
    padding: 20px;
    background: #f8f9fa;
    border-left: 4px solid #3498db;
}

.pcm-minimal-title {
    margin: 0 0 15px 0;
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
}

.pcm-minimal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.pcm-minimal-item {
    margin-bottom: 10px;
}

.pcm-minimal-link {
    display: inline-block;
    padding: 8px 15px;
    background: #ffffff;
    border-radius: 6px;
    text-decoration: none;
    color: #3498db;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.pcm-minimal-link:hover {
    background: #3498db;
    color: #ffffff;
    border-color: #3498db;
}

/* ========== Template: Grid ========== */
.pcm-widget-grid .pcm-grid-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.pcm-widget-grid .pcm-grid-item {
    background: #fff;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.pcm-widget-grid .pcm-grid-item:hover {
    border-color: #3498db;
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.2);
}

.pcm-widget-grid .pcm-grid-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px 15px;
    text-decoration: none;
    text-align: center;
}

.pcm-widget-grid .pcm-grid-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.pcm-widget-grid .pcm-grid-anchor {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
    line-height: 1.4;
}

.pcm-widget-grid .pcm-grid-metric {
    font-size: 12px;
    color: #7f8c8d;
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
    .pcm-widget {
        padding: 20px;
        margin: 30px 0;
    }
    
    .pcm-widget-title {
        font-size: 20px;
    }
    
    .pcm-widget-card .pcm-cards-grid,
    .pcm-widget-grid .pcm-grid-container {
        grid-template-columns: 1fr;
    }
    
    .pcm-widget-list .pcm-list-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pcm-widget-list .pcm-list-arrow {
        display: none;
    }
}

/* ========== Dark Mode Support ========== */
@media (prefers-color-scheme: dark) {
    .pcm-widget {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .pcm-widget-title {
        color: #ffffff;
    }
    
    .pcm-widget-default .pcm-related-item {
        background: #2d2d2d;
    }
    
    .pcm-widget-default .pcm-related-link {
        color: #ffffff;
    }
    
    .pcm-widget-list .pcm-list-item {
        background: #2d2d2d;
        border-color: #3d3d3d;
    }
    
    .pcm-widget-list .pcm-list-title {
        color: #ffffff;
    }
}
