/* =================================================================
 * Page Specific Styles for Box Shadow Generator (style.css)
 * ================================================================= */

/* --- 右カラム追従 (Sticky) 設定 --- */
.tool-results-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}
.tool-results-sticky::-webkit-scrollbar { width: 6px; }
.tool-results-sticky::-webkit-scrollbar-thumb { background: rgba(150,150,150,0.3); border-radius: 4px; }

/* --- CSS出力テキストエリア --- */
.code-output { 
    font-family: 'Fira Code', 'Cascadia Code', 'Courier New', monospace; 
    font-size: 0.9rem; 
    resize: none; 
    background-color: var(--bs-tertiary-bg); 
    color: var(--bs-emphasis-color);
    white-space: pre; 
    overflow-x: auto; 
    border-color: var(--bs-border-color-translucent);
    line-height: 1.5;
}

/* --- レイヤーリスト（ドラッグ＆ドロップ） --- */
.layer-item {
    transition: opacity 0.2s, border-color 0.2s, background-color 0.2s, box-shadow 0.2s, transform 0.2s;
    position: relative;
}

.dragging-item { 
    opacity: 0.3; 
    transform: scale(0.97);
    border-style: dashed !important;
}

.drag-over-item { 
    border-color: var(--bs-primary) !important; 
    border-style: dashed !important;
    background-color: rgba(var(--bs-primary-rgb), 0.1) !important;
}

.drag-handle {
    cursor: grab;
    padding: 4px;
    transition: color 0.2s;
}
.drag-handle:hover { color: var(--bs-primary) !important; }
.drag-handle:active { cursor: grabbing !important; }

/* --- 履歴ボタン --- */
.history-btn-wrapper { position: relative; display: inline-block; }
.history-delete-btn {
    position: absolute; top: -6px; right: -6px; width: 18px; height: 18px;
    background: var(--bs-danger); color: white; border-radius: 50%; font-size: 10px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: 2px solid var(--bs-body-bg); opacity: 0; transition: opacity 0.2s;
}
.history-btn-wrapper:hover .history-delete-btn { opacity: 1; }

.preset-btn {
    width: 44px; height: 44px; border-radius: 0.375rem; border: 2px solid transparent;
    cursor: pointer; padding: 0; transition: all 0.2s; 
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.preset-btn:hover { 
    border-color: var(--bs-primary); 
    transform: translateY(-2px);
}

/* --- フローティング保存ボタン --- */
.floating-save-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.floating-save-btn:hover {
    transform: scale(1.05) translateY(-3px);
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.3) !important;
}

/* --- フォームパーツの視認性向上（いつものサイズ） --- */

.form-label {
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.form-range::-webkit-slider-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background: var(--bs-primary);
    border: 2px solid var(--bs-body-bg);
}

.form-range::-webkit-slider-runnable-track {
    background-color: var(--bs-border-color-translucent);
    height: 8px;
    border-radius: 4px;
}

.form-control-color {
    height: 38px;
    border-radius: 0.375rem;
    cursor: pointer;
}

.badge.bg-secondary-subtle {
    font-size: 0.85rem !important;
    font-weight: 600;
    padding: 0.4em 0.75em;
    border: 1px solid var(--bs-border-color-translucent);
}

/* ドロップダウンのホバー色 */
.dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}
.dropdown-item:hover {
    background-color: var(--bs-primary);
    color: white;
}