/* ========================================
   Toast Notifications
   ======================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background-color: var(--bg-elevated);
    color: var(--text-primary);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    transform: translateX(120%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid var(--border);
    min-width: 240px;
}

.toast.show {
    transform: translateX(0);
}

.toast .material-symbols-rounded {
    font-size: 20px;
}

.toast-info .material-symbols-rounded { color: var(--info); }
.toast-success .material-symbols-rounded { color: var(--success); }
.toast-error .material-symbols-rounded { color: var(--error); }
.toast-warning .material-symbols-rounded { color: var(--warning); }

/* ========================================
   Scroll to Bottom Button
   ======================================== */
#scroll-to-bottom-btn {
    position: absolute;
    bottom: 90px;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background-color: var(--bg-elevated);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    z-index: 50;
}

#scroll-to-bottom-btn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#scroll-to-bottom-btn:hover {
    background-color: var(--primary-light);
    color: var(--primary);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

#scroll-to-bottom-btn .material-symbols-rounded {
    font-size: 20px;
}

/* ========================================
   GitHub Stats
   ======================================== */
.settings-footer-info {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.github-link {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--text-primary);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    background-color: var(--bg-secondary);
    transition: all var(--transition-fast);
    border: 1px solid var(--border);
    font-weight: 500;
    font-size: 14px;
}

.github-link:hover {
    background-color: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.github-stars {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 600;
}

.github-stars .material-symbols-rounded {
    font-size: 16px;
    color: var(--warning);
}

#github-stars-count {
    min-width: 20px;
}

/* ========================================
   Browser Modal
   ======================================== */
.browser-modal-content {
    width: 90vw;
    max-width: 1100px;
    height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 0;
    overflow: hidden;
    margin: 5vh auto;
}

.browser-modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 16px;
    background-color: var(--bg);
}

.browser-viewport-container {
    flex: 1;
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    position: relative;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

#browser-viewport {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    cursor: crosshair;
    box-shadow: var(--shadow-md);
    display: block;
}

.browser-status-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    padding: 12px 24px;
    border-radius: var(--radius-full);
    font-size: 14px;
    pointer-events: none;
    box-shadow: var(--shadow-md);
    z-index: 10;
}

.browser-controls {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.browser-controls .instruction {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
    flex: 1 1 240px;
}

.browser-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 280px;
    min-width: 220px;
}

#browser-type-input {
    min-width: 0;
    flex: 1;
    height: 40px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-input);
    color: var(--text);
    font-size: 14px;
    outline: none;
}

#browser-type-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent);
}

.browser-icon-btn {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    color: var(--text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.browser-icon-btn:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.browser-icon-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.55;
}

.browser-icon-btn .material-symbols-rounded {
    font-size: 20px;
}

.browser-controls .primary-btn {
    background-color: var(--primary);
    color: var(--text-inverse);
    padding: 10px 20px;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.browser-controls .primary-btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.browser-controls .primary-btn:disabled {
    background-color: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

/* ========================================
   Utility Classes (replacing inline styles)
   ======================================== */
.error-text {
    color: var(--error) !important;
}

.warning-text {
    color: var(--warning) !important;
}

.error-box {
    color: var(--error);
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background-color: var(--error-light);
    font-size: 14px;
}

.warning-box {
    color: var(--warning);
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    background-color: var(--warning-light);
    font-size: 14px;
}
