/**
 * Dropdown Manager Page Styles
 * Part of V22.5.0 - Complete English-only unified system
 * Comprehensive styling for centralized dropdown list management
 */

/* ===== PAGE LAYOUT ===== */

.dropdown-manager-page {
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.dropdown-manager-page .page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.dropdown-manager-page .header-content h2 {
    margin: 0 0 10px 0;
    color: #1f2937;
    font-size: 28px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.dropdown-manager-page .header-content p {
    margin: 0;
    color: #6b7280;
    font-size: 14px;
}

.dropdown-manager-page .header-actions {
    display: flex;
    gap: 12px;
}

/* ===== MAIN CONTENT LAYOUT ===== */

.dropdown-content {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 30px;
    min-height: 600px;
}

/* ===== DROPDOWN SIDEBAR ===== */

.dropdown-sidebar {
    background: white;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    height: fit-content;
}

.category-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.category-list-header h3 {
    margin: 0;
    font-size: 18px;
    color: #1f2937;
}

.category-list-header .badge {
    background: #667eea;
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}

.category-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.category-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    width: 100%;
    position: relative;
}

.category-item:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateX(4px);
}

.category-item.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-color: #667eea;
    color: white;
}

.category-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.category-item.active .category-item-icon {
    background: rgba(255, 255, 255, 0.2);
}

.category-item-content {
    flex: 1;
}

.category-item-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 2px;
}

.category-item-count {
    font-size: 12px;
    opacity: 0.7;
}

.changes-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: #f59e0b;
    border-radius: 50%;
    border: 2px solid white;
}

/* ===== CATEGORY EDITOR ===== */

.category-editor {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
}

.editor-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.editor-title i {
    font-size: 28px;
    color: #667eea;
}

.editor-title h3 {
    margin: 0;
    font-size: 24px;
    color: #1f2937;
}

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

.editor-description {
    background: #f0f9ff;
    border-left: 4px solid #3b82f6;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    color: #1e40af;
    display: flex;
    align-items: center;
    gap: 10px;
}

.editor-stats {
    display: flex;
    gap: 30px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #6b7280;
    font-size: 14px;
}

.stat-item i {
    color: #667eea;
    font-size: 18px;
}

/* ===== VALUES LIST ===== */

.values-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-height: 600px;
    overflow-y: auto;
    padding-right: 10px;
}

.values-list::-webkit-scrollbar {
    width: 8px;
}

.values-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.values-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.values-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.empty-values {
    text-align: center;
    padding: 60px 20px;
    background: #f9fafb;
    border-radius: 12px;
    color: #6b7280;
}

.empty-values i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #9ca3af;
}

.value-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f9fafb;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.value-item:hover {
    border-color: #d1d5db;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.value-handle {
    cursor: move;
    color: #9ca3af;
    font-size: 16px;
    padding: 5px;
}

.value-handle:hover {
    color: #667eea;
}

.value-color-picker {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
}

.value-color-picker:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

.value-color-picker input[type="color"] {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 60px;
    height: 60px;
    border: none;
    cursor: pointer;
}

.value-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.value-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    color: #1f2937;
    transition: all 0.2s ease;
}

.value-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.value-meta {
    display: flex;
    gap: 8px;
    align-items: center;
}

.usage-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #e0e7ff;
    color: #4338ca;
}

.usage-badge.unused {
    background: #f3f4f6;
    color: #6b7280;
}

.default-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    background: #fef3c7;
    color: #92400e;
}

.value-actions {
    display: flex;
    gap: 6px;
}

.system-locked {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #9ca3af;
    font-size: 14px;
}

/* ===== BUTTONS ===== */

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-secondary {
    background: #f3f4f6;
    color: #1f2937;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    border: none;
    background: #f3f4f6;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.btn-icon.btn-danger {
    color: #dc2626;
}

.btn-icon.btn-danger:hover:not(:disabled) {
    background: #fee2e2;
}

.btn-icon:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

/* ===== TOAST NOTIFICATIONS ===== */

.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    padding: 16px 24px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    min-width: 300px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast i {
    font-size: 20px;
}

.toast-success {
    border-left: 4px solid #10b981;
}

.toast-success i {
    color: #10b981;
}

.toast-error {
    border-left: 4px solid #ef4444;
}

.toast-error i {
    color: #ef4444;
}

.toast-info {
    border-left: 4px solid #3b82f6;
}

.toast-info i {
    color: #3b82f6;
}

.toast span {
    flex: 1;
    color: #1f2937;
    font-size: 14px;
}

/* ===== RESPONSIVE DESIGN ===== */

@media (max-width: 1024px) {
    .dropdown-content {
        grid-template-columns: 1fr;
    }

    .dropdown-sidebar {
        max-height: 300px;
        overflow-y: auto;
    }
}

@media (max-width: 768px) {
    .dropdown-manager-page .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .dropdown-manager-page .header-actions {
        width: 100%;
        justify-content: stretch;
    }

    .dropdown-manager-page .header-actions .btn {
        flex: 1;
    }

    .editor-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .editor-actions {
        width: 100%;
        flex-direction: column;
    }

    .editor-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .editor-stats {
        flex-direction: column;
        gap: 15px;
    }

    .value-item {
        flex-wrap: wrap;
    }

    .value-content {
        flex-basis: 100%;
    }
}

@media (max-width: 480px) {
    .dropdown-manager-page {
        padding: 15px;
    }

    .category-editor {
        padding: 20px;
    }

    .value-item {
        padding: 12px;
    }
}
