/* =================================================================
 * Page Specific Styles for UI Template (style.css)
 * ================================================================= */

.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; }

.preview-container {
    border-radius: 0.5rem;
    transition: background-color 0.3s ease;
    background-image: radial-gradient(rgba(150, 150, 150, 0.2) 1px, transparent 1px);
    background-size: 20px 20px;
}
.preview-container.dark-mode { background-color: #121212; }
.preview-container.light-mode { background-color: #f8f9fa; border: 1px solid #dee2e6; }

#preview-wrapper { 
    display: inline-block;
    transition: padding 0.2s; 
}

.code-output { 
    font-family: monospace; 
    font-size: 0.85rem; 
    resize: none; 
    background-color: var(--bs-tertiary-bg); 
    white-space: pre; 
    overflow-x: auto; 
}

.preset-btn {
    width: 40px; height: 40px; border-radius: 0.25rem; border: 2px solid transparent;
    cursor: pointer; padding: 0; transition: border-color 0.2s; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
.preset-btn:hover, .preset-btn.active { border-color: var(--bs-primary); }
.preset-btn i { font-size: 1.2rem; }

.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; }
.history-delete-btn:hover { transform: scale(1.1); }

.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;
}