/* ========================================
   SETTINGS PANEL STYLES
   ======================================== */

#settingsPanelContainer {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    max-height: 600px;
    background: linear-gradient(145deg, rgba(30, 30, 30, 0.98), rgba(20, 20, 20, 0.98));
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 15px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    z-index: 900;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Tab Navigation */
.settings-tabs {
    display: flex;
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 2px solid rgba(255, 215, 0, 0.2);
    padding: 5px;
    gap: 5px;
    flex-wrap: wrap;
}

.settings-tab {
    flex: 1;
    min-width: 80px;
    padding: 8px 12px;
    background: rgba(60, 60, 60, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    color: #FFD700;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.settings-tab:hover {
    background: rgba(80, 80, 80, 0.7);
    border-color: rgba(255, 215, 0, 0.4);
    transform: translateY(-2px);
}

.settings-tab.active {
    background: linear-gradient(145deg, rgba(255, 215, 0, 0.3), rgba(255, 165, 0, 0.3));
    border-color: #FFD700;
    box-shadow: 0 2px 8px rgba(255, 215, 0, 0.3);
}

/* Tab Content */
.settings-tab-content {
    display: none;
    padding: 20px;
    overflow-y: auto;
    max-height: 500px;
}

.settings-tab-content.active {
    display: block;
}

.settings-tab-content h4 {
    margin: 0 0 15px 0;
    color: #FFD700;
    font-size: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 215, 0, 0.3);
}

/* Setting Items */
.setting-item {
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(40, 40, 40, 0.5);
    border: 1px solid rgba(255, 215, 0, 0.2);
    border-radius: 10px;
    transition: all 0.3s ease;
}

.setting-item:hover {
    background: rgba(50, 50, 50, 0.6);
    border-color: rgba(255, 215, 0, 0.4);
}

.setting-item label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    gap: 10px;
}

.setting-item input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #FFD700;
}

.setting-label {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    flex: 1;
}

.setting-description {
    margin: 10px 0 0 28px;
    color: #CCCCCC;
    font-size: 12px;
    line-height: 1.5;
    font-style: italic;
}

/* Settings Panel Specific Scrollbar */
.settings-tab-content::-webkit-scrollbar {
    width: 8px;
}

.settings-tab-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.settings-tab-content::-webkit-scrollbar-thumb {
    background: rgba(255, 215, 0, 0.3);
    border-radius: 4px;
}

.settings-tab-content::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 215, 0, 0.5);
}

/* ========================================
   LOCATION LABEL SETTINGS - Radio Groups
   ======================================== */

.setting-group-label {
    display: block;
    margin-bottom: 10px;
    color: #FFD700;
    font-size: 13px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.setting-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.radio-option {
    display: flex;
    align-items: flex-start;
    padding: 10px;
    background: rgba(60, 60, 60, 0.4);
    border: 2px solid rgba(255, 215, 0, 0.2);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.radio-option:hover {
    background: rgba(70, 70, 70, 0.5);
    border-color: rgba(255, 215, 0, 0.4);
}

.radio-option input[type="radio"] {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    cursor: pointer;
    flex-shrink: 0;
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: #FFD700;
}

.radio-option.compact {
    padding: 8px 10px;
    flex-direction: row;
    align-items: center;
}

.radio-label {
    flex: 1;
    margin-left: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.radio-title {
    font-size: 13px;
    font-weight: bold;
    color: #ffffff;
}

.radio-description {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
}

/* ========================================
   LABEL PREVIEW
   ======================================== */

.label-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 30px;
    background: linear-gradient(145deg, rgba(10, 10, 20, 0.8), rgba(20, 20, 30, 0.8));
    border-radius: 10px;
    border: 1px solid rgba(255, 215, 0, 0.2);
    min-height: 150px;
}

.label-preview {
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    max-width: 280px;
}

/* Classic Design */
.label-preview.classic {
    background: linear-gradient(145deg, rgba(40, 40, 40, 0.95), rgba(30, 30, 30, 0.95));
    border: 2px solid rgba(255, 215, 0, 0.5);
}

.label-preview.classic .preview-location-code {
    color: #FFD700;
    margin-bottom: 6px;
}

.label-preview.classic .preview-location-status {
    color: #4CAF50;
    margin-bottom: 4px;
}

.label-preview.classic .preview-location-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Vibrant Glass Design */
.label-preview.vibrant {
    background: linear-gradient(135deg,
        rgba(156, 39, 176, 0.3),
        rgba(63, 81, 181, 0.3),
        rgba(33, 150, 243, 0.3),
        rgba(0, 188, 212, 0.3));
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4),
                inset 0 0 20px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.label-preview.vibrant::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
        transparent,
        rgba(255, 255, 255, 0.1),
        transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }
    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.label-preview.vibrant .preview-location-code {
    color: #FFD700;
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.5),
                 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
}

.label-preview.vibrant .preview-location-status {
    color: #4CAF50;
    text-shadow: 0 0 10px rgba(76, 175, 80, 0.5),
                 0 2px 4px rgba(0, 0, 0, 0.5);
    margin-bottom: 4px;
}

.label-preview.vibrant .preview-location-details {
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

/* Font Styles */
.preview-label-content {
    position: relative;
    z-index: 1;
}

.preview-location-code {
    font-size: 14px;
    font-weight: bold;
}

.preview-location-status {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.preview-location-details {
    font-size: 11px;
}

/* Font Size Variants */
.label-preview.font-small .preview-location-code {
    font-size: 12px;
}

.label-preview.font-small .preview-location-status {
    font-size: 10px;
}

.label-preview.font-small .preview-location-details {
    font-size: 9px;
}

.label-preview.font-medium .preview-location-code {
    font-size: 14px;
}

.label-preview.font-medium .preview-location-status {
    font-size: 12px;
}

.label-preview.font-medium .preview-location-details {
    font-size: 11px;
}

.label-preview.font-large .preview-location-code {
    font-size: 16px;
}

.label-preview.font-large .preview-location-status {
    font-size: 14px;
}

.label-preview.font-large .preview-location-details {
    font-size: 12px;
}

/* Font Weight Variants */
.label-preview.font-bold .preview-location-code,
.label-preview.font-bold .preview-location-status,
.label-preview.font-bold .preview-location-details {
    font-weight: 700;
}

.label-preview.font-regular .preview-location-code,
.label-preview.font-regular .preview-location-status,
.label-preview.font-regular .preview-location-details {
    font-weight: 400;
}

.label-preview.font-regular .preview-location-code {
    font-weight: 600; /* Keep code slightly bold for readability */
}

/* ========================================
   BACKGROUND COLOR OPTIONS
   ======================================== */

.color-options-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.color-option {
    position: relative;
    cursor: pointer;
}

.color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.color-swatch {
    padding: 30px 15px;
    border-radius: 8px;
    border: 3px solid rgba(255, 215, 0, 0.2);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.color-swatch::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.9;
    z-index: 0;
}

.color-name {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 12px;
    font-weight: bold;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

/* Color Swatch Backgrounds */
.color-swatch.dark-blue::before {
    background: linear-gradient(145deg, rgba(20, 20, 60, 0.95), rgba(40, 40, 80, 0.95));
}

.color-swatch.dark-purple::before {
    background: linear-gradient(145deg, rgba(60, 20, 80, 0.95), rgba(80, 40, 100, 0.95));
}

.color-swatch.dark-green::before {
    background: linear-gradient(145deg, rgba(20, 60, 40, 0.95), rgba(30, 80, 50, 0.95));
}

.color-swatch.dark-red::before {
    background: linear-gradient(145deg, rgba(80, 20, 30, 0.95), rgba(100, 30, 40, 0.95));
}

/* Selected state */
.color-option input[type="radio"]:checked + .color-swatch {
    border-color: #FFD700;
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.5),
                inset 0 0 20px rgba(255, 215, 0, 0.2);
    transform: scale(1.05);
}

.color-option:hover .color-swatch {
    border-color: rgba(255, 215, 0, 0.5);
    transform: scale(1.02);
}

/* Add checkmark for selected */
.color-option input[type="radio"]:checked + .color-swatch::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 8px;
    color: #FFD700;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 0 8px rgba(255, 215, 0, 0.8);
    z-index: 2;
}

/* ========================================
   OPACITY CONTROL
   ======================================== */

.opacity-control {
    display: flex;
    align-items: center;
    gap: 15px;
}

.opacity-control input[type="range"] {
    flex: 1;
    height: 6px;
    background: linear-gradient(to right,
        rgba(255, 215, 0, 0.3),
        rgba(255, 215, 0, 0.6),
        rgba(255, 215, 0, 1.0));
    border-radius: 3px;
    outline: none;
    -webkit-appearance: none;
}

.opacity-control input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.opacity-control input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.opacity-control input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: linear-gradient(145deg, #FFD700, #FFA500);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.opacity-control input[type="range"]::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(255, 215, 0, 0.6);
}

.opacity-display {
    min-width: 50px;
    text-align: center;
    padding: 6px 12px;
    background: rgba(255, 215, 0, 0.2);
    border: 1px solid rgba(255, 215, 0, 0.4);
    border-radius: 6px;
    font-size: 13px;
    font-weight: bold;
    color: #FFD700;
}

/* Background color variants for preview */
.label-preview.bg-dark-blue {
    background: linear-gradient(145deg, rgba(20, 20, 60, 0.95), rgba(40, 40, 80, 0.95));
    border-color: rgba(100, 150, 255, 0.5);
}

.label-preview.bg-dark-purple {
    background: linear-gradient(145deg, rgba(60, 20, 80, 0.95), rgba(80, 40, 100, 0.95));
    border-color: rgba(200, 100, 255, 0.5);
}

.label-preview.bg-dark-green {
    background: linear-gradient(145deg, rgba(20, 60, 40, 0.95), rgba(30, 80, 50, 0.95));
    border-color: rgba(100, 255, 150, 0.5);
}

.label-preview.bg-dark-red {
    background: linear-gradient(145deg, rgba(80, 20, 30, 0.95), rgba(100, 30, 40, 0.95));
    border-color: rgba(255, 100, 120, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    #settingsPanelContainer {
        width: calc(100% - 40px);
        max-width: 90vw;
        max-height: 80vh;
    }

    .settings-tab {
        font-size: 11px;
        padding: 6px 8px;
    }
}
