/* Properties Panel Enhancements */

/* Alignment Buttons */
.alignment-buttons {
    display: flex;
    background: #f1f5f9;
    border-radius: 6px;
    padding: 2px;
    gap: 2px;
}

.align-btn,
.valign-btn {
    flex: 1;
    border: none;
    background: transparent;
    padding: 6px;
    border-radius: 4px;
    cursor: pointer;
    color: #64748b;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.align-btn:hover,
.valign-btn:hover {
    background: #e2e8f0;
    color: #334155;
}

.align-btn.active,
.valign-btn.active {
    background: #ffffff;
    color: #6366f1;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Icon Grid */
.icon-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
    padding: 8px 0;
}

.icon-option {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    color: #64748b;
    transition: all 0.2s;
    background: #fff;
}

.icon-option:hover {
    border-color: #6366f1;
    color: #6366f1;
}

.icon-option.selected {
    background: #6366f1;
    color: white;
    border-color: #6366f1;
}

/* Custom Number Input Wrapper */
.custom-number-input {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.custom-number-input input {
    width: 100%;
    padding-right: 20px !important;
}

/* Hide native spinners */
.no-spinner::-webkit-inner-spin-button,
.no-spinner::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.no-spinner {
    -moz-appearance: textfield;
}

/* Custom Spinner Buttons */
.spinner-btns {
    position: absolute;
    right: 2px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0px;
    /* No gap */
    z-index: 5;
    height: auto;
    /* Allow packing */
}

.spin-btn {
    border: none;
    background: transparent;
    color: #f97316;
    /* Orange arrow */
    padding: 0;
    font-size: 13px;
    /* Increased size */
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.1s;
    line-height: 1;
    height: 12px;
    /* Fixed compact height */
    margin: 1px 0;
    /* Tiny margin for touch target, or 0 to close gap completely */
}

.spin-btn:hover {
    color: #ea580c;
    /* Removed background on hover for cleaner look, or keep subtle */
    filter: brightness(1.1);
}

.spin-btn:active {
    transform: scale(0.9);
}

/* Range Slider (Seek Bar) Styling */
.property-slider {
    -webkit-appearance: none;
    width: 100%;
    background: transparent;
    margin: 8px 0;
}

.property-slider:focus {
    outline: none;
}

/* Webkit Track */
.property-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 2px;
    /* Thin white bar */
    cursor: pointer;
    background: #ffffff;
    border-radius: 1px;
}

/* Webkit Thumb */
.property-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    height: 12px;
    width: 12px;
    border-radius: 50%;
    background: #f97316;
    /* Orange to match other controls */
    cursor: pointer;
    margin-top: -5px;
    /* Center on 2px track */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Firefox Track */
.property-slider::-moz-range-track {
    width: 100%;
    height: 2px;
    cursor: pointer;
    background: #ffffff;
    border-radius: 1px;
}

/* Firefox Thumb */
.property-slider::-moz-range-thumb {
    height: 12px;
    width: 12px;
    border: none;
    border-radius: 50%;
    background: #f97316;
    cursor: pointer;
}