/* Resources Component Styles */

/* Resources tabs */
.resources-tabs {
    display: flex;
    margin-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.resources-sub-tab {
    padding: 8px 16px;
    cursor: pointer;
    border: 1px solid transparent;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    background-color: #f8f9fa;
    margin-right: 3px;
    font-size: 14px;
}

.resources-sub-tab.active {
    background-color: white;
    border-color: #ddd;
    border-bottom-color: white;
    margin-bottom: -1px;
    color: var(--primary-color);
    font-weight: bold;
}

.resources-sub-tab-content {
    display: none;
}

.resources-sub-tab-content.active {
    display: block;
}

/* Resources List Styles */
.resources-list {
    background-color: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.resource-item {
    padding: 12px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
    border-left: 3px solid transparent;
}

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

.resource-item:hover {
    background-color: #f5f5f5;
}

.resource-item.active {
    background-color: rgba(40, 167, 69, 0.1);
    border-left-color: #28a745;
}

.resource-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.resource-item-name {
    font-weight: bold;
    color: var(--secondary-color);
}

.resource-item-category {
    font-size: 12px;
    padding: 2px 6px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 10px;
}

.resource-item-description {
    font-size: 13px;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}

.resource-item-tags {
    font-size: 11px;
    color: #999;
}

.resource-item-active {
    font-size: 12px;
    padding: 2px 6px;
    background-color: #d4edda;
    color: #155724;
    border-radius: 10px;
    margin-left: 5px;
}

/* Resource Editor Styles */
.resource-editor {
    padding: 20px;
    border: 3px solid #28a745;
    border-radius: 4px;
    background-color: #f8f9fa;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    height: auto !important;
    min-height: 500px !important;
    overflow: visible !important;
    position: relative;
    z-index: 10;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

/* Resource filters */
.resource-filters {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #e9ecef;
    border-radius: 4px;
}

/* Resource Modal Styles */
.resource-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
}

.resource-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.resource-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    max-height: 90vh;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.resource-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.resource-modal-header h3 {
    margin: 0;
    color: var(--secondary-color);
}

.resource-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: #777;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.resource-modal-close:hover {
    background-color: #eee;
    color: var(--error-color);
}

.resource-modal-body {
    padding: 20px;
    overflow-y: auto;
    max-height: calc(90vh - 70px);
}

/* Analytics Section Styles */
.analytics-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-bottom: 20px;
}

.analytics-actions {
    margin-top: 20px;
    text-align: center;
}

/* Stat cards */
.stat-card {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stat-card h4 {
    margin: 0 0 10px 0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-card .stat-value {
    font-size: 2em;
    font-weight: bold;
    color: #333;
}

/* Form elements */
#resource-content {
    min-height: 150px;
}

#resource-description {
    min-height: 80px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .resources-tabs {
        flex-direction: column;
    }
    
    .resources-sub-tab {
        margin-right: 0;
        margin-bottom: 2px;
        border-radius: 4px;
    }
}