/* ========================================
   PROPERTY GRIDS & INPUTS
   ======================================== */

.property-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.property-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.property-item.full {
    width: 100%;
}

.property-item label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.4);
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Inputs & Controls */
.property-group input[type="text"],
.property-group select,
.property-item input[type="text"],
.property-item select,
.compact-select {
    width: 100%;
    box-sizing: border-box;
    padding: var(--spacing-sm);
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    color: var(--color-text-primary);
    font-family: var(--font-primary);
    font-size: 14px;
    transition: all var(--transition-fast);
}

/* Dark dropdown styling — applied to every <select> in the app so
   the open option list never falls back to native white. The closed
   state inherits a chevron + dark gradient via the ruleset below. */
.property-group select,
.property-item select,
.setting-row select,
.compact-select,
select.app-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 36px;
    background-color: rgba(0, 0, 0, 0.22);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.72)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, calc(100% - 12px) 50%;
    background-size: auto, 14px 14px;
    cursor: pointer;
}

/* Dark popup options — Chromium honours these for the dropdown list. */
select option,
select optgroup {
    background-color: #101317;
    color: #f2f4f8;
}

.property-group input[type="text"]:focus,
.property-group select:focus,
.property-item input[type="text"]:focus,
.property-item select:focus,
.compact-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px rgba(var(--color-accent-rgb), 0.2);
}

.compact-select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding-right: 40px;
    background-color: rgba(0, 0, 0, 0.22);
    background-image:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.72)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat, no-repeat;
    background-position: 0 0, calc(100% - 12px) 50%;
    background-size: auto, 14px 14px;
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.compact-select:hover {
    border-color: rgba(255, 255, 255, 0.22);
    background-color: rgba(255, 255, 255, 0.06);
}

.compact-select option {
    background: #101317;
    color: #f2f4f8;
}

.compact-input {
    width: 100%;
}

/* Sliders & Values */
.slider-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.slider-val {
    font-family: var(--font-mono);
    font-size: 10px;
    color: var(--color-accent);
    min-width: 35px;
    text-align: right;
    font-weight: 600;
}

.slider-row input[type="range"] {
    flex: 1;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    appearance: none;
    cursor: pointer;
}

.slider-row input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 12px;
    height: 12px;
    background: var(--color-accent);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-accent-glow);
}

/* Color Pickers */
.quick-style-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.quick-color-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}

.property-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.custom-color-picker-label {
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.45);
    line-height: 1;
    flex-shrink: 0;
    transform: translateX(-4px);
}

.color-dot {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                border-color 0.2s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.color-dot:hover {
    transform: scale(1.2);
}

.color-dot.active {
    border-color: white;
    transform: scale(1.1);
}

.color-wheel-control {
    position: relative;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: conic-gradient(from 180deg, #ff5b5b, #ffd35b, #72ff72, #53d7ff, #7a6dff, #ff69d7, #ff5b5b);
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: inset 0 0 0 0.2px rgba(255,255,255,0.12);
    box-sizing: border-box;
}

.color-wheel-core {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--selected-color, #ffffff);
    border: 0.2px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.28);
    pointer-events: none;
}

.compact-color-picker,
.color-picker-row input[type="color"],
.background-control-row input[type="color"] {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

/* Checkboxes */
.checkbox-row {
    grid-column: span 2;
    padding: 10px 0;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    cursor: pointer;
    font-size: 13px;
}

.checkbox-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: var(--color-accent);
    cursor: pointer;
}

.color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.background-control-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.compact-slider-row {
    flex: 1;
    min-width: 0;
}

.recent-colors-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.recent-colors-label {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.9px;
    color: rgba(255, 255, 255, 0.36);
}

.recent-colors-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.recent-color-chip {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.12);
    background: var(--chip-color, #ffffff);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.recent-color-chip:hover {
    transform: scale(1.12);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Accordion Sections */
.accordion-section {
    display: flex;
    flex-direction: column;
    gap: 0;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    border: 0;
    background: transparent;
    color: inherit;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s ease;
}

.accordion-trigger:hover {
    background: rgba(255, 255, 255, 0.04);
}

.accordion-trigger-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.accordion-title {
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.4);
}

.accordion-summary {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
}

.accordion-chevron {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.accordion-section.is-open .accordion-chevron {
    transform: rotate(180deg);
    color: rgba(255, 255, 255, 0.9);
}

.accordion-panel {
    display: none;
    padding: 0 16px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(0, 0, 0, 0.12);
}

.accordion-section.is-open .accordion-panel {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding-top: 16px;
}

.label-options {
    display: flex;
    flex-direction: column;
    gap: 18px;
    transition: opacity 0.2s ease;
}

.segmented-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.toggle-chip {
    position: relative;
}

.toggle-chip input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-chip span,
.btn-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toggle-chip input:checked + span {
    background: rgba(var(--color-accent-rgb), 0.18);
    border-color: rgba(var(--color-accent-rgb), 0.45);
    color: #ffffff;
    box-shadow: inset 0 0 0 1px rgba(var(--color-accent-rgb), 0.2);
}

.btn-chip:hover,
.toggle-chip span:hover {
    background: rgba(255, 255, 255, 0.09);
    color: #ffffff;
}

.btn-chip {
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.label-position-row {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.integration-toggle-row {
    width: 100%;
}

.integration-detail {
    display: none;
}

.integration-detail.is-visible {
    display: flex;
}

.ui-hidden-control {
    display: none !important;
}

.inline-hint {
    font-size: 11px;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.5);
}


/* Info Glass */
.coords-info-glass {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 14px;
    padding: 16px;
    font-family: var(--font-mono);
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.8;
}

.profile-select-group {
    display: flex;
    gap: 8px;
}

.btn-icon-small {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-icon-small:hover {
    background: rgba(255, 255, 255, 0.12);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}
