/**
 * WP AffLinks Resources CSS
 */

/* Frontend Resource Page Styles */
.wp-afflinks-resource-header {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px 0;
}

.resource-page-title {
    font-size: 2.5em;
    color: #333;
    margin-bottom: 15px;
    font-weight: 700;
}

.resource-page-description {
    font-size: 1.1em;
    color: #666;
    line-height: 1.6;
    max-width: 800px;
    margin: 0 auto;
}

/* Admin Styles */
.wp-afflinks-resources-header {
    background: #fff;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 20px;
}

.wp-afflinks-resources-header p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
}

.wp-afflinks-resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.wp-afflinks-resource-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.wp-afflinks-resource-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.resource-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.resource-icon {
    width: 40px;
    height: 40px;
    background: #f0f0f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 15px;
}

.resource-icon i {
    font-size: 18px;
    color: #666;
}

.resource-title h3 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
}

.resource-category {
    font-size: 12px;
    color: #666;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

.resource-status {
    margin-left: auto;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.active {
    background: #d4edda;
    color: #155724;
}

.status-badge.inactive {
    background: #f8d7da;
    color: #721c24;
}

.resource-description {
    margin-bottom: 15px;
}

.resource-description p {
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.4;
}

.resource-url {
    margin-bottom: 15px;
}

.resource-url a {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    word-break: break-all;
}

.resource-url a:hover {
    text-decoration: underline;
}

.resource-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.resource-actions .button {
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
}

.wp-afflinks-no-services {
    text-align: center;
    padding: 40px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
}

.wp-afflinks-no-services p {
    margin: 0;
    color: #666;
}

.wp-afflinks-no-services a {
    color: #0073aa;
    text-decoration: none;
}

.wp-afflinks-no-services a:hover {
    text-decoration: underline;
}

/* Icon Preview */
.icon-preview {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-align: center;
}

.icon-preview i {
    font-size: 24px;
    color: #666;
}

/* Frontend Styles */
.wp-afflinks-resources-page-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.wp-afflinks-resources-header {
    text-align: center;
    margin-bottom: 40px;
}

.wp-afflinks-resources-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #333;
}

.wp-afflinks-resources-header p {
    font-size: 1.1em;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.wp-afflinks-resource-page {
    margin-bottom: 40px;
}

.wp-afflinks-resource-category {
    margin-bottom: 40px;
}

.resource-category-title {
    font-size: 1.8em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

.wp-afflinks-services-list {
    margin-bottom: 30px;
}

/* Grid Layout */
.wp-afflinks-services-list.layout-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* List Layout */
.wp-afflinks-services-list.layout-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.wp-afflinks-services-list.layout-list .wp-afflinks-service-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 8px;
    background: #fff;
    transition: all 0.3s ease;
}

.wp-afflinks-services-list.layout-list .wp-afflinks-service-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transform: translateY(-1px);
}

.wp-afflinks-services-list.layout-list .service-icon {
    margin-right: 20px;
    flex-shrink: 0;
}

.wp-afflinks-services-list.layout-list .service-content {
    flex: 1;
}

.wp-afflinks-services-list.layout-list .service-url {
    margin-left: 20px;
    flex-shrink: 0;
}

/* Cards Layout */
.wp-afflinks-services-list.layout-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.wp-afflinks-services-list.layout-cards .wp-afflinks-service-item {
    background: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.wp-afflinks-services-list.layout-cards .wp-afflinks-service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.wp-afflinks-services-list.layout-cards .service-icon {
    margin: 0 auto 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wp-afflinks-services-list.layout-cards .service-icon i {
    font-size: 24px;
    color: #fff;
}

.wp-afflinks-services-list.layout-cards .service-name {
    margin-bottom: 15px;
}

.wp-afflinks-services-list.layout-cards .service-name a {
    color: #333;
    text-decoration: none;
    font-size: 1.2em;
    font-weight: 600;
}

.wp-afflinks-services-list.layout-cards .service-description {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.5;
}

.wp-afflinks-services-list.layout-cards .service-link {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.wp-afflinks-services-list.layout-cards .service-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    color: #fff;
}

/* Service Item Styles */
.wp-afflinks-service-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 20px;
    transition: all 0.3s ease;
}

.wp-afflinks-service-item:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    border-color: #ddd;
}

.service-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.service-icon i {
    font-size: 20px;
    color: #666;
}

.service-name {
    margin: 0 0 10px 0;
}

.service-name a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1em;
}

.service-name a:hover {
    color: #0073aa;
}

.service-description {
    margin: 0 0 15px 0;
    color: #666;
    line-height: 1.5;
    font-size: 14px;
}

.service-url {
    margin-top: 15px;
}

.service-link {
    display: inline-block;
    background: #0073aa;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.service-link:hover {
    background: #005a87;
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .wp-afflinks-resources-grid {
        grid-template-columns: 1fr;
    }
    
    .wp-afflinks-services-list.layout-grid,
    .wp-afflinks-services-list.layout-cards {
        grid-template-columns: 1fr;
    }
    
    .wp-afflinks-services-list.layout-list .wp-afflinks-service-item {
        flex-direction: column;
        text-align: center;
    }
    
    .wp-afflinks-services-list.layout-list .service-icon {
        margin: 0 0 15px 0;
    }
    
    .wp-afflinks-services-list.layout-list .service-url {
        margin: 15px 0 0 0;
    }
    
    .resource-header {
        flex-direction: column;
        text-align: center;
    }
    
    .resource-icon {
        margin: 0 0 15px 0;
    }
    
    .resource-status {
        margin: 15px 0 0 0;
    }
    
    .resource-actions {
        justify-content: center;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .wp-afflinks-resource-card,
    .wp-afflinks-service-item {
        background: #2d3748;
        border-color: #4a5568;
        color: #e2e8f0;
    }
    
    .resource-title h3,
    .service-name a {
        color: #e2e8f0;
    }
    
    .resource-description p,
    .service-description {
        color: #a0aec0;
    }
    
    .resource-icon,
    .service-icon {
        background: #4a5568;
    }
    
    .resource-icon i,
    .service-icon i {
        color: #a0aec0;
    }
    
    .resource-category {
        background: #4a5568;
        color: #a0aec0;
    }
    
    .wp-afflinks-resources-header {
        background: #2d3748;
        border-color: #4a5568;
    }
    
    .wp-afflinks-resources-header p {
        color: #a0aec0;
    }
} 