/* Tool Specific Styles */
.tool-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.code-card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background-color: var(--bg-body);
    border-bottom: 1px solid var(--border-color);
}

.label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.text-btn {
    background: none;
    border: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

textarea {
    width: 100%;
    height: 250px;
    padding: 16px;
    border: none;
    resize: vertical;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    background-color: var(--bg-surface);
    color: var(--text-main);
    outline: none;
    line-height: 1.5;
    white-space: pre;
    tab-size: 4;
}

textarea:focus {
    background-color: var(--bg-body);
}

/* Action Buttons */
.action-row {
    display: flex;
    gap: 12px;
}

.action-row button {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: transform 0.1s;
}

.action-row button:active {
    transform: scale(0.98);
}

.primary-btn {
    background-color: var(--primary-blue);
    color: white;
}

.secondary-btn {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-color) !important;
    color: var(--text-main);
}

/* Icon Buttons */
.actions {
    display: flex;
    gap: 8px;
}
.icon-button.small { padding: 6px; }
.icon-button.danger { color: #ef4444; }
.icon-button.danger:hover { background-color: rgba(239, 68, 68, 0.1); }

/* Modal & Toast Styles */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.5); z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); transition: all 0.3s ease;
}
.modal-overlay.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.modal-content {
    background: var(--bg-surface); width: 90%; max-width: 400px;
    padding: 24px; border-radius: var(--radius-lg); border: 1px solid var(--border-color);
}
.modal-header { display: flex; justify-content: space-between; margin-bottom: 16px; }
.modal-header h3 { font-size: 1.2rem; font-weight: 700; color: var(--text-main); }
.modal-body p { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 12px; }
.modal-body strong { color: var(--text-main); }

.toast {
    position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(20px);
    background-color: var(--accent-green); color: white; padding: 12px 24px;
    border-radius: 50px; font-weight: 600; font-size: 0.9rem;
    opacity: 0; visibility: hidden; transition: all 0.3s ease; z-index: 3000;
}
.toast.visible { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }

@media (max-width: 600px) {
    textarea { height: 180px; }
    .action-row { flex-direction: column; }
}