/* Advanced Tools Menu */
.advanced-tools-menu.show {
    display: flex !important;
    animation: advancedToolsMenuSlideIn 0.3s ease-out;
}

@keyframes advancedToolsMenuSlideIn {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Cut Edit Panel */
.cut-panel.show {
    display: flex !important;
    animation: cutPanelSlideIn 0.32s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cutPanelSlideIn {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cut-panel--collapsed .cut-panel__body {
    display: none;
}

.cut-panel-title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: rgb(17 24 39);
    line-height: 1.25;
}

.dark .cut-panel-title {
    color: rgb(243 244 246);
}

.cut-panel-subtitle {
    font-size: 0.75rem;
    color: rgb(107 114 128);
    line-height: 1.2;
}

.dark .cut-panel-subtitle {
    color: rgb(156 163 175);
}

.cut-panel-icon-btn {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 0.5rem;
    background: transparent;
    color: rgb(75 85 99);
    cursor: pointer;
    transition: background-color 0.15s, color 0.15s;
}

.cut-panel-icon-btn:hover {
    background: rgb(219 234 254);
    color: rgb(37 99 235);
}

.dark .cut-panel-icon-btn {
    color: rgb(156 163 175);
}

.dark .cut-panel-icon-btn:hover {
    background: rgb(31 41 55);
    color: rgb(96 165 250);
}

.cut-panel-icon-btn--danger:hover {
    background: rgb(254 226 226);
    color: rgb(220 38 38);
}

.dark .cut-panel-icon-btn--danger:hover {
    background: rgb(127 29 29 / 0.35);
    color: rgb(248 113 113);
}

.cut-panel-field__label {
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(107 114 128);
    margin-bottom: 0.375rem;
}

.dark .cut-panel-field__label {
    color: rgb(156 163 175);
}

.cut-panel__quick-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.cut-panel-enabled-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.625rem;
    border-radius: 9999px;
    border: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    font-size: 0.8125rem;
    font-weight: 500;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s;
}

.dark .cut-panel-enabled-toggle {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
    color: rgb(209 213 219);
}

.cut-panel-enabled-toggle:hover {
    border-color: rgb(59 130 246);
}

.cut-panel-enabled-toggle__dot {
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 9999px;
    background: rgb(156 163 175);
    flex-shrink: 0;
}

.cut-panel-enabled-toggle__dot.is-on {
    background: rgb(34 197 94);
    box-shadow: 0 0 0 3px rgb(34 197 94 / 0.25);
}

.cut-panel-enabled-toggle__dot.is-off {
    background: rgb(156 163 175);
}

.cut-panel__quick-toggles {
    display: inline-flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.cut-panel-toggle-btn {
    padding: 0.3125rem 0.625rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(209 213 219);
    background: white;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: all 0.15s;
}

.dark .cut-panel-toggle-btn {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
    color: rgb(209 213 219);
}

.cut-panel-toggle-btn:hover {
    border-color: rgb(59 130 246);
    color: rgb(37 99 235);
}

.cut-panel-toggle-btn.is-active {
    border-color: rgb(59 130 246);
    background: rgb(239 246 255);
    color: rgb(37 99 235);
}

.dark .cut-panel-toggle-btn.is-active {
    background: rgb(30 58 138 / 0.35);
    color: rgb(147 197 253);
}

.cut-panel-check span {
    font-size: 0.8125rem;
    color: rgb(55 65 81);
}

.dark .cut-panel-check span {
    color: rgb(209 213 219);
}

.cut-panel-range-row {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.cut-panel-range {
    height: 0.375rem;
    accent-color: rgb(59 130 246);
    cursor: pointer;
}

.cut-panel-number {
    width: 4.25rem;
    padding: 0.25rem 0.375rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(209 213 219);
    background: white;
    font-size: 0.75rem;
    font-family: ui-monospace, monospace;
    color: rgb(17 24 39);
}

.cut-panel-number--wide {
    width: 5rem;
}

.dark .cut-panel-number {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
    color: rgb(243 244 246);
}

.cut-panel-step-group {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.cut-panel-step-btn {
    width: 1.5rem;
    height: 1.125rem;
    padding: 0;
    border: 1px solid rgb(209 213 219);
    border-radius: 0.25rem;
    background: rgb(249 250 251);
    font-size: 0.625rem;
    line-height: 1;
    color: rgb(75 85 99);
    cursor: pointer;
}

.dark .cut-panel-step-btn {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
    color: rgb(156 163 175);
}

.cut-panel-step-btn:hover {
    background: rgb(219 234 254);
    border-color: rgb(59 130 246);
    color: rgb(37 99 235);
}

.cut-panel-pills {
    display: flex;
    gap: 0.375rem;
    flex-wrap: wrap;
}

.cut-panel-pill {
    flex: 1;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(209 213 219);
    background: white;
    font-size: 0.75rem;
    font-weight: 500;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: all 0.15s;
}

.dark .cut-panel-pill {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
    color: rgb(209 213 219);
}

.cut-panel-pill:hover {
    border-color: rgb(59 130 246);
}

.cut-panel-pill.is-active {
    border-color: rgb(59 130 246);
    background: rgb(239 246 255);
    color: rgb(37 99 235);
}

.dark .cut-panel-pill.is-active {
    background: rgb(30 58 138 / 0.35);
    color: rgb(147 197 253);
}

.cut-panel-select {
    padding: 0.25rem 0.375rem;
    border-radius: 0.375rem;
    border: 1px solid rgb(209 213 219);
    background: white;
    font-size: 0.75rem;
    color: rgb(17 24 39);
}

.dark .cut-panel-select {
    border-color: rgb(55 65 81);
    background: rgb(17 24 39);
    color: rgb(243 244 246);
}

.cut-panel-unit {
    font-size: 0.75rem;
    color: rgb(107 114 128);
}

.cut-panel-hint {
    font-size: 0.6875rem;
    line-height: 1.45;
    color: rgb(107 114 128);
    margin: 0;
}

.dark .cut-panel-hint {
    color: rgb(156 163 175);
}

.cut-panel-export-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.375rem;
}

.cut-panel-export-btn {
    padding: 0.4375rem 0.5rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(209 213 219);
    background: rgb(249 250 251);
    font-size: 0.75rem;
    font-weight: 600;
    color: rgb(55 65 81);
    cursor: pointer;
    transition: all 0.15s;
}

.dark .cut-panel-export-btn {
    border-color: rgb(55 65 81);
    background: rgb(31 41 55);
    color: rgb(209 213 219);
}

.cut-panel-export-btn:hover:not(:disabled) {
    border-color: rgb(59 130 246);
    background: rgb(239 246 255);
    color: rgb(37 99 235);
}

.cut-panel-export-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.cut-panel__edit-section--disabled {
    opacity: 0.45;
    pointer-events: none;
}

.cut-panel-loading {
    position: absolute;
    inset: 0;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgb(255 255 255 / 0.82);
    backdrop-filter: blur(4px);
}

.dark .cut-panel-loading {
    background: rgb(17 24 39 / 0.82);
}

.cut-panel-loading.hidden {
    display: none !important;
}

.cut-panel-loading__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    text-align: center;
}

.cut-panel-loading__spinner {
    width: 2rem;
    height: 2rem;
    border: 2px solid rgb(209 213 219);
    border-top-color: rgb(59 130 246);
    border-radius: 9999px;
    animation: cutPanelSpin 0.75s linear infinite;
}

@keyframes cutPanelSpin {
    to {
        transform: rotate(360deg);
    }
}

.cut-panel-loading__text {
    font-size: 0.8125rem;
    color: rgb(75 85 99);
    max-width: 16rem;
}

.dark .cut-panel-loading__text {
    color: rgb(209 213 219);
}

/* Cut Properties Modal */
.cut-properties-modal.show {
    display: flex !important;
    animation: modalSlideInLeft 0.3s ease-out;
}

.cut-properties-modal.hidden {
    display: none !important;
}

.delete-confirmation-modal.show {
    display: flex !important;
}
