/* ============================================
   PROPERTIES PANEL STYLES
   ============================================ */

.properties-panel {
    position: fixed;
    width: 240px;
    background: var(--bg-panel);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-lg);
    z-index: 1100;
    box-shadow: var(--shadow-lg);
    animation: slideInLeft var(--duration-normal) var(--ease-out);
}

.props-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-medium);
}

.props-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.props-header-actions {
    display: flex;
    align-items: center;
    gap: 4px;
}

.props-lock-btn {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    padding: 0;
    transition: all var(--duration-fast) var(--ease-out);
}

.props-lock-btn:hover {
    color: var(--text-primary);
    border-color: var(--border-medium);
    background: var(--bg-base);
}

.props-lock-btn.active {
    color: var(--accent-primary);
    border-color: var(--accent-primary);
    background: var(--accent-primary-dim);
}

.props-close {
    background: none;
    border: none;
    border-radius: var(--radius-xs);
    color: var(--text-muted);
    font-size: 18px;
    cursor: pointer;
    padding: 0 4px;
    line-height: 1;
    transition: color var(--duration-fast) var(--ease-out);
}

.props-close:hover {
    color: var(--text-primary);
}

.props-body {
    padding: 12px 14px;
    max-height: 400px;
    overflow-y: auto;
}

.props-body::-webkit-scrollbar {
    width: 4px;
}

.props-body::-webkit-scrollbar-track {
    background: transparent;
}

.props-body::-webkit-scrollbar-thumb {
    background: var(--border-medium);
    border-radius: 2px;
}

/* ---- FIELDS ---- */
.props-field {
    margin-bottom: 10px;
}

.props-field label {
    display: block;
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.props-val {
    color: var(--accent-primary);
    font-family: var(--font-mono);
}

.props-field-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.props-field-row label {
    margin-bottom: 0;
}

/* ---- INPUTS ---- */
.props-input,
.props-select {
    width: 100%;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    padding: 5px 8px;
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
}

.props-input:focus,
.props-select:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--border-focus);
}

.props-select {
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 4l3 3 3-3' stroke='%23D4AF37' fill='none' stroke-width='1.5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 24px;
}

.props-select option {
    background: var(--bg-elevated);
    color: var(--text-primary);
}

/* ---- COLOR SWATCHES ---- */
.props-color-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
}

.props-swatch {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out), transform 0.1s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.props-swatch:hover {
    transform: scale(1.15);
}

.props-swatch.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--bg-base), 0 0 8px rgba(255, 255, 255, 0.2);
}

.props-swatch-custom-wrap {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid transparent;
    overflow: hidden;
    cursor: pointer;
    transition: border-color var(--duration-fast) var(--ease-out), transform 0.1s ease;
    position: relative;
    background: conic-gradient(#ef4444, #eab308, #10b981, #3b82f6, #8b5cf6, #ef4444);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.props-swatch-custom-wrap:hover {
    transform: scale(1.15);
}

.props-swatch-custom-wrap.active {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 1px var(--bg-base), 0 0 8px rgba(255, 255, 255, 0.2);
}

.props-swatch-custom {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ---- RANGE SLIDER ---- */
.props-range {
    width: 100%;
    height: 4px;
    -webkit-appearance: none;
    appearance: none;
    background: var(--border-medium);
    border-radius: 2px;
    outline: none;
    margin-top: 4px;
}

.props-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-base);
}

.props-range::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--accent-primary);
    cursor: pointer;
    border: 2px solid var(--bg-base);
}

.props-val-static {
    color: var(--accent-primary);
    font-family: var(--font-mono);
    font-size: 13px;
    letter-spacing: 0.3px;
}

/* ---- ACTIONS ---- */
.props-actions {
    margin-top: 12px;
    display: flex;
    gap: 6px;
}

/* ---- TEXT CONTENT TEXTAREA ---- */
.props-textarea {
    width: 100%;
    padding: 8px;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 13px;
    resize: vertical;
    outline: none;
    transition: border-color var(--duration-fast) var(--ease-out), box-shadow var(--duration-fast) var(--ease-out);
    min-height: 48px;
}

.props-textarea:focus {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--border-focus);
}

/* ---- TOGGLE BUTTON ROW ---- */
.props-toggle-row {
    display: flex;
    gap: 4px;
}

.props-toggle {
    flex: 1;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-base);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3px;
    cursor: pointer;
    transition: all var(--duration-fast) var(--ease-out);
    padding: 0;
}

.props-toggle:hover {
    color: var(--text-primary);
    border-color: var(--border-strong);
}

.props-toggle.active {
    background: var(--accent-primary-dim);
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.props-toggle svg {
    display: block;
}

/* ---- RESPONSIVE ---- */
@media (max-width: 640px) {
    .properties-panel {
        left: 8px;
        right: 8px;
        width: auto;
        bottom: 60px;
    }
}
