/* Settings Panel - Modern Glassmorphism Design */
#settings-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 60%; /* Or 800px */
    max-width: 900px;
    height: 100vh;
    background: rgba(10, 14, 23, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(0, 229, 255, 0.2);
    box-shadow: -10px 0 50px rgba(0, 0, 0, 0.5);
    z-index: 9999;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    overflow: hidden;
}

#settings-panel.visible {
    transform: translateX(0);
}

/* Sidebar */
.settings-sidebar {
    width: 250px;
    background: rgba(0, 0, 0, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
}

.settings-header {
    padding: 0 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 10px;
}

.settings-logo {
    font-size: 20px;
    font-weight: 800;
    color: #fff;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.settings-logo i {
    color: #00e5ff;
}

.settings-nav-btn {
    background: transparent;
    border: none;
    color: #889;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    text-align: left;
    padding: 15px 25px;
    cursor: pointer;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.settings-nav-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.02);
}

.settings-nav-btn.active {
    color: #00e5ff;
    background: rgba(0, 229, 255, 0.05);
    border-left: 3px solid #00e5ff;
    text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

/* Content Area */
.settings-content {
    flex: 1;
    position: relative;
    overflow-y: auto;
    background: linear-gradient(180deg, rgba(0,229,255,0.02) 0%, rgba(0,0,0,0) 100%);
    padding: 30px 40px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Close Button */
.settings-close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    background: transparent;
    border: none;
    color: #666;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.2s;
    z-index: 10;
}

.settings-close-btn:hover {
    color: #ff003c;
    transform: rotate(90deg);
}

/* Tab Content */
.panel-tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.panel-tab-content.active {
    display: flex;
    flex-direction: column;
    height: 100%;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Section Styling */
.settings-section {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
}

/* Scanner tab specific - make it fill height */
#panel-tab-scanner .settings-section {
    flex: 1;
    margin-bottom: 0;
    overflow: hidden;
    padding: 20px;
}

.settings-section h3 {
    margin: 0 0 15px 0;
    font-size: 15px;
    color: #fff;
    border-bottom: 1px solid rgba(0, 229, 255, 0.2);
    padding-bottom: 10px;
    display: flex;
    justify-content: space-between;
    flex-shrink: 0;
}

/* Status Indicator */
.settings-status {
    margin-top: auto; /* Push to bottom */
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 11px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00e5ff;
    box-shadow: 0 0 8px #00e5ff;
    display: none;
}

.status-dot.saving {
    background: #ffcc00;
    box-shadow: none;
    display: block;
    animation: blink 1s infinite;
}

.status-dot.saved {
    background: #00ff41;
    box-shadow: 0 0 8px #00ff41;
    display: block;
}

@keyframes blink {
    50% { opacity: 0.4; }
}

/* Form Elements Override */
.settings-input-group label {
    display: block;
    color: #889;
    font-size: 12px;
    margin-bottom: 8px;
    font-weight: 500;
}

.settings-input-group input[type="text"],
.settings-input-group input[type="password"],
.settings-input-group input[type="number"],
.settings-input-group select {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #00e5ff;
    padding: 12px 15px;
    border-radius: 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    transition: all 0.3s;
}

.settings-input-group input:focus {
    border-color: #00e5ff;
    box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
    outline: none;
    background: rgba(0, 0, 0, 0.5);
}

/* Custom Checkbox */
.custom-checkbox-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.custom-checkbox-wrapper label {
    margin: 0;
    font-size: 14px;
    color: #ccc;
}
