/* Admin Content Management Styles */

/* Sub-tabs */
.sub-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 0;
}

.sub-tab {
    background: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 14px;
    color: #666;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.sub-tab:hover {
    color: #c62292;
}

.sub-tab.active {
    color: #c62292;
    border-bottom-color: #c62292;
    font-weight: 600;
}

/* Content sections */
.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Content subsections */
.content-subsection {
    display: none;
}

.content-subsection.active {
    display: block;
}

/* Content header with actions */
.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.content-header h2 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

/* Content grid for cards */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Content card */
.content-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.content-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
}

.content-card-title {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0 0 8px 0;
}

.content-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.content-card-description {
    font-size: 14px;
    color: #666;
    margin: 12px 0;
    line-height: 1.5;
}

.content-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e0e0e0;
}

.content-card-actions {
    display: flex;
    gap: 8px;
}

/* Type badges */
.type-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.type-badge.video {
    background: #e91e631a;
    color: #e91e63;
}

.type-badge.document {
    background: #2196f31a;
    color: #2196f3;
}

.type-badge.troubleshooting {
    background: #ff98001a;
    color: #ff9800;
}

.type-badge.leaflet {
    background: #4caf501a;
    color: #4caf50;
}

/* Status badges */
.status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.active {
    background: #4caf501a;
    color: #4caf50;
}

.status-badge.inactive {
    background: #f443361a;
    color: #f44336;
}

/* Availability badges */
.availability-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
}

.availability-badge.in_stock {
    background: #4caf501a;
    color: #4caf50;
}

.availability-badge.out_of_stock {
    background: #f443361a;
    color: #f44336;
}

.availability-badge.on_order {
    background: #ff98001a;
    color: #ff9800;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #4caf50;
}

input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

/* Search and filter bar */
.search-filter-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.search-filter-bar input[type="text"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.search-filter-bar select {
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 18px;
    margin-bottom: 8px;
}

.empty-state-subtext {
    font-size: 14px;
    color: #bbb;
}

/* Contact list */
.contact-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-item-info {
    flex: 1;
}

.contact-item-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.contact-item-value {
    color: #666;
    font-size: 14px;
}

.contact-item-type {
    font-size: 12px;
    color: #999;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 768px) {
    .sub-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .search-filter-bar {
        flex-direction: column;
    }

    .search-filter-bar select {
        width: 100%;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}
