/**
 * Video Finishing Tool - Properties Panel Styles
 * Right sidebar for element properties
 */

/* Properties Panel */
.properties-panel {
    width: var(--properties-width);
    flex-shrink: 0;
    background: var(--bg-secondary);
    border-left: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.panel-header {
    padding: var(--spacing-md);
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-tertiary);
}

.panel-header h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.panel-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--spacing-md);
}

/* Properties Sections */
.properties-section {
    margin-bottom: var(--spacing-lg);
}

.properties-section:last-child {
    margin-bottom: 0;
}

.properties-section h4 {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-subtle);
}

/* Property Rows */
.prop-row {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.prop-row:last-child {
    margin-bottom: 0;
}

.prop-row label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.prop-row span:not(.time-separator) {
    font-size: 13px;
    color: var(--text-primary);
}

/* Timing Row (horizontal layout) */
.timing-row {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--spacing-sm);
}

.timing-row label {
    width: 30px;
}

.timing-row .time-input {
    flex: 1;
    min-width: 60px;
}

/* Form Inputs */
input[type="text"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: var(--spacing-sm);
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 13px;
    font-family: inherit;
    transition: all var(--transition-fast);
}

input[type="text"]:focus,
input[type="number"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

textarea {
    resize: vertical;
    min-height: 60px;
}

select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23a0a0b0' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

/* Time Input */
.time-input {
    font-family: 'SF Mono', 'Monaco', 'Inconsolata', monospace;
    text-align: center;
}

/* Color Input */
input[type="color"] {
    width: 100%;
    height: 36px;
    padding: 2px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 2px;
}

/* Range Input */
input[type="range"] {
    width: 100%;
    height: 4px;
    background: var(--bg-surface);
    border-radius: var(--radius-full);
    appearance: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 14px;
    height: 14px;
    background: var(--accent-primary);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    background: var(--accent-primary-hover);
    transform: scale(1.1);
}

input[type="range"]:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="range"]:disabled::-webkit-slider-thumb {
    cursor: not-allowed;
}

/* Checkbox Input */
input[type="checkbox"] {
    width: 18px;
    height: 18px;
    appearance: none;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

input[type="checkbox"]:checked {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 6px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

input[type="checkbox"]:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.2);
}

/* Range with Value Display */
.prop-row:has(input[type="range"]) {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
}

.prop-row:has(input[type="range"]) label {
    width: 100%;
    margin-bottom: var(--spacing-xs);
}

.prop-row:has(input[type="range"]) input[type="range"] {
    flex: 1;
}

.prop-row:has(input[type="range"]) span {
    min-width: 45px;
    text-align: right;
    font-family: 'SF Mono', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Stroke Options (conditional visibility) */
.stroke-options {
    padding-left: var(--spacing-md);
    border-left: 2px solid var(--border-subtle);
}

/* Property Value Display */
.prop-value {
    font-family: 'SF Mono', monospace;
    font-size: 13px;
    color: var(--text-primary);
    background: var(--bg-surface);
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--radius-sm);
}

/* Scrollbar Styling */
.panel-content::-webkit-scrollbar {
    width: 6px;
}

.panel-content::-webkit-scrollbar-track {
    background: transparent;
}

.panel-content::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: var(--radius-full);
}

.panel-content::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}
