﻿/* Components.css
   Centralized styles moved from component-scoped .razor.css files.
   Sections:
   - TopNavBar
   - SearchBox
   - TldSelector
*/

/* =============================
   region TopNavBar
   ============================= */

/* Navigation buttons with increased font size */
.nav-button-enlarged .mud-button-root {
    font-size: 1.15em;
    border-radius: 50px;
}

/* =============================
   region Scroll-Spy Navigation
   ============================= */
.nav-scroll-spy-container {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-scroll-spy-button {
    text-transform: none;
    color: #ffffff !important;
    font-weight: 500 !important;
    font-size: 1.1em !important;
    min-width: 80px;
    padding: 6px 12px;
}

.nav-scroll-spy-indicator {
    position: absolute;
    bottom: 2px;
    height: 3px;
    background-color: var(--mud-palette-primary, var(--primary-500));
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    z-index: 10;
}

/* =============================
   region SearchBox
   ============================= */

/* =============================
   region NameOptionList Papers
   ============================= */

.section-kicker {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    font-weight: 800 !important;
    letter-spacing: 2px !important;
    color: rgb(222, 75, 74) !important;
    margin-bottom: 8px;
    font-size: 0.875rem !important;
}

.section-kicker::before {
    content: "";
    width: 24px;
    height: 2px;
    background: rgb(222, 75, 74);
    border-radius: 99px;
}

.name-options-paper {
    padding: 12px;
    border-radius: 10px;
    border: 1px solid rgb(58, 75, 108);
    background-color: #1D203C !important;
    /* Normal layered shadow for natural depth, matching search-box-paper */
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.18),
        0 4px 8px rgba(0, 0, 0, 0.14),
        0 12px 24px rgba(0, 0, 0, 0.10) !important;
    transition: outline-color 200ms ease, box-shadow 200ms ease, transform 200ms ease;
}

.favorites-list-paper {
    padding: 8px 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    background-color: color-mix(in srgb, var(--mud-palette-surface) 60%, rgba(0,0,0,1)) !important;
}

.others-list-paper {
    padding: 8px 12px;
    border-radius: 8px;
    background-color: color-mix(in srgb, var(--mud-palette-surface) 60%, rgba(0,0,0,1));
}

/* =============================
   region NameOptionRow Detail View
   ============================= */

.name-option-row-collapse,
.name-option-row-collapse .mud-collapse-wrapper,
.name-option-row-collapse .mud-collapse-wrapper-inner {
    overflow: hidden !important;
}

.expandable-section {
    overflow: hidden;
}

/* Top row (score, name, domain chips, subsearch icons, hide/favorite).
   When expanded, we nudge the top padding slightly so the spacing between
   the top row and the selected-details block feels more even. The
   transition keeps this change smooth as the collapse expands/contracts. */
.name-option-row-header {
    padding-top: 2px;
    transition: padding-top 120ms ease-out;
}

.name-option-row-header-expanded {
    padding-top: 6px;
    padding-bottom: 2px;
}

.preview-chips-container {
    gap: 4px;
}

.preview-chips-more-text {
}

/* Hide and Favorite buttons in NameOptionRow */
.name-option-actions {
    position: absolute;
    right: 15px;
    height: 100%;
    opacity: 0;
    transition: opacity 150ms ease-in-out;
    z-index: 5;
    background-color: transparent;
    pointer-events: none;
}

.name-option-row:hover .name-option-actions {
    opacity: 1;
    pointer-events: auto;
}

.name-option-action-button {
    background-color: color-mix(in srgb, var(--mud-palette-surface) 90%, transparent) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    border-radius: 50%;
}

.name-option-row:hover .name-option-action-button {
    background-color: color-mix(in srgb, rgba(255, 255, 255, 0.06) 95%, transparent) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.name-option-row-selected .name-option-action-button,
.name-option-row-selected:hover .name-option-action-button {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 15%, var(--mud-palette-surface)) !important;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.2) !important;
}

.selected-details-div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 8px;
    margin-bottom: 6px;
    padding: 4px;
    border-radius: 10px;
    background-color: color-mix(in srgb, var(--mud-palette-surface) 60%, rgba(0,0,0,1));
    box-sizing: border-box;
}

.selected-details {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 8px;
    gap: 10px;
    box-sizing: border-box;
}

.domain-details {
    flex: 2 1 60%;
    padding: 2px;
    padding-left: 4px;
    gap: 0px;
}

.fulldomain-and-price-row {
    width: 100%;
    align-items: center;
}

.bookmark-and-fulldomain {
    align-items: center;
    gap: 8px;
}

.bookmark-button {
    scale: 1.3;
    padding: 4px;
}

.fulldomain-button {
    /* Make the domain look like plain text by default */
    text-transform: none;
    justify-content: flex-start;
    padding: 0 6px;
    min-width: 0;
    background-color: transparent;
    box-shadow: none;
    border-radius: 8px;
    font-size: 20px;
    /*font-weight: 500;*/
}

/* Highlight background and reveal icon on hover/focus */
.fulldomain-button:hover,
.fulldomain-button:focus-visible {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 12%, transparent);
}

.fulldomain-button-icon {
    margin-left: 8px;
    opacity: 0;
    transition: opacity 0.15s ease-in-out;
}

.fulldomain-button:hover .fulldomain-button-icon,
.fulldomain-button:focus-visible .fulldomain-button-icon {
    opacity: 1;
}

/* Wrapper to position the inline "Copied to clipboard" tooltip relative
   to the selected domain button. */
.fulldomain-button-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Small, unobtrusive tooltip that appears near the selected domain
   text when it has just been copied to the clipboard. */
.copy-tooltip {
    position: absolute;
    right: 0;
    bottom: -1.6rem;
    padding: 2px 8px;
    border-radius: 8px;
    font-size: 0.75rem;
    background-color: color-mix(in srgb, var(--mud-palette-surface) 80%, rgba(0,0,0,1));
    color: var(--mud-palette-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    pointer-events: none;
    z-index: 5;
}

.purchase-button {
    min-width: 100px;
    height: 36px;
    border-radius: 10px;
    justify-content: space-between;
}

.purchase-button-loading {
    min-width: 100px;
    height: 36px;
    min-height: 36px;
    border-radius: 10px;
    box-sizing: border-box;
}

.info-and-buttons-row {
    width: 100%;
    margin-top: 4px;
}

.domain-info {
    gap: 0px;
}

.domain-info .mud-typography {
    font-size: 14px;
}

.button-stack {
    gap: 6px;
}

.action-button {
    text-transform: none;
    background-color: rgba(255, 255, 255, 0.04);
    transition: background-color 0.2s;
    margin-block: 1px;
    padding-block: 2px;
    padding-left: 6px;
    padding-right: 8px;
    min-width: 48px;
}

.action-button:hover {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 15%, rgba(255, 255, 255, 0.1));
}

.subsearch-stack {
    width: 220px;
    gap: 6px;
    padding-left: 4px;
    padding-right: 4px;
    align-items: flex-start;
}

.subsearch-button {
    width: 100%;
    height: 24px;
    background-color: rgba(255, 255, 255, 0.04);
    transition: background-color 0.2s, box-shadow 0.2s;
    padding-left: 10px;
    padding-right: 12px;
    padding-top: 4px;
    padding-bottom: 4px;
    border-radius: 100px;
    /* Make button text align to the left and the EndIcon all the way on the right */
    justify-content: space-between;
    text-transform: none;
}

.subsearch-button:hover {
    box-shadow: inset 0 0 100px 100px rgba(255, 255, 255, 0.1);
}

.tld-list .mud-tabs-panels,
.tld-list .mud-tab-panel,
.tld-list .mud-tabs-toolbar,
.tld-panel {
    background: none !important;
}

.tld-list-div, .selected-details-div {
    background-image: none !important;
}

.tld-list-div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-top: 0px;
    margin-bottom: 10px;
    border-radius: 10px;
    background-color: color-mix(in srgb, var(--mud-palette-surface) 60%, rgba(0,0,0,1));
    box-sizing: border-box;
    min-height: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.tld-list {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Make the MudTabs fill the whole tld-list area */
.tld-list.mud-stack > .mud-tabs {
    flex: 1 1 auto;
    display: flex;
    flex-direction: row; /* Position.Left uses row layout for toolbar and content */
    min-height: 0;
    height: 100%;
}

/* In MudTabs Position.Left, .mud-tabs-contents is the right side */
.tld-list .mud-tabs-contents {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: calc(100% - 160px);
    background: rgba(255, 255, 255, 0.03) !important;
}

/* Force TLD tabs on the left to be scrollable and have fixed height */
.tld-list .mud-tabs-toolbar {
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    flex: 0 0 160px !important; /* Give the sidebar a fixed width to prevent horizontal overflow/squishing */
    min-width: 160px !important;
    scrollbar-width: thin; /* Make scrollbar less intrusive */
    background: rgba(0, 0, 0, 0.05) !important;
}

/* =============================
   region NameOptionDetail Tabs
   ============================= */
.detail-tabs-container {
    display: flex;
    flex-direction: row;
    gap: 8px;
    width: 100%;
    margin-bottom: 0;
}

.detail-tab-button {
    flex: 1;
    height: 56px !important;
    border-top-left-radius: 12px !important;
    border-top-right-radius: 12px !important;
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    text-transform: none !important;
    padding: 8px !important;
    transition: all 0.2s ease-in-out !important;
    position: relative;
    z-index: 1;
}

.detail-tab-button:hover {
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
}

.detail-tab-button.active {
    background-color: color-mix(in srgb, var(--mud-palette-primary) 10%, var(--mud-palette-surface)) !important;
    border-color: var(--mud-palette-primary) !important;
    border-bottom-color: transparent !important; /* Blend into content container */
    z-index: 3;
}

.detail-tab-content-stack {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.detail-tab-title {
    font-size: 14px !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.9) !important;
}

.detail-tab-subtitle {
    font-size: 11px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-top: -2px;
}

.detail-tab-button.active .detail-tab-title {
    color: var(--mud-palette-primary-lighten) !important;
}

.detail-tab-button.active .detail-tab-subtitle {
    color: var(--mud-palette-primary-lighten) !important;
    opacity: 0.8;
}

/* Folder container that visually connects tabs with the content area */
.detail-folder {
    width: 100%;
}

.detail-folder-tabs {
    padding-left: 4px;
    padding-right: 4px;
}

.detail-folder-content {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-top: none; /* Let active tab overlap this border */
    background-color: color-mix(in srgb, var(--mud-palette-surface) 80%, rgba(0,0,0,1));
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    padding: 12px;
    position: relative;
    z-index: 2;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25) inset;
}

.detail-tab-subtitle.unchecked {
    color: rgba(158, 158, 158, 0.6) !important;
}

.tld-list .mud-tabs-toolbar::-webkit-scrollbar {
    width: 6px;
}

.tld-list .mud-tabs-toolbar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.tld-list .mud-tabs-toolbar-content {
    height: 100% !important; /* Allow content to grow naturally for scrolling */
    display: block !important; /* Ensure tabs stack vertically and don't try to flex-grow horizontally */
}

.tld-list .mud-tab {
    min-height: 36px !important;
    height: 36px !important;
    padding: 4px 12px !important;
    text-transform: none !important;
}

/* Make the panel container fill the height */
.tld-list .mud-tabs-panels {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    overflow: visible !important;
    min-height: 0;
    height: 100%;
}

.tld-list .mud-tabs-panel-content {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: visible !important;
    height: 100%;
}

/* Ensure the active tab panel stretches to full height and behaves as a flex column */
.tld-list .mud-tab-panel {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
}

.tld-tab-content {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 10px 10px 4px 10px; /* Increased bottom padding to avoid overflow */
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0; /* allow child flex items to shrink */
    box-sizing: border-box;
    overflow: hidden !important;
    height: 100%;
}

/* Scrollable chip set area that takes remaining space above footer */
.tld-tab-chipset {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 0;
    flex: 1 1 auto;
    min-height: 0;
    max-width: 100%;
    overflow-y: auto !important;
    padding-bottom: 4px; /* Tiny bit of padding for chips */
}

.tld-tab-footer {
    width: 100%;
    padding-top: 4px;
    padding-bottom: 8px;
    flex-shrink: 0;
    min-height: 40px;
    background: transparent;
}

.tld-tab-actions {
    column-gap: 0px;
    row-gap: 0px;
}

.tld-tab-action-button {
    padding: 2px 10px;
    margin-inline: -4px !important;
    min-width: 60px;
    border-radius: 32px;
    transform: scale(0.9);
    line-height: 1.15;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tld-tab-action-button .mud-button-end-icon {
    margin-inline-start: 4px;
    margin-inline-end: 0;
}

.tld-sort-select {
    transform: scale(0.9);
}

.tld-sort-select .mud-input-control {
    margin-top: 0;
}

.tld-sort-select .mud-input-outlined-border {
    border-radius: 32px;
}

.tld-tab-action-button .mud-button-label {
    gap: 4px;
}

/* Make carousel items fill available space */
.carousel-item-interaction {
    width: 100%;
    min-height: 500px;
}

.carousel-item-searchbox {
    width: 100%;
    min-height: 200px;
}

/* This still doesn't work, TODO fixme */
.carousel-item-interaction .mud-paper {
    margin: auto !important;
}

.mud-carousel.mud-carousel-default.search-carousel {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 200px;
    position: relative; /* ensure stacking context */
    z-index: 1101;      /* above .search-overlay (1000) */
    transition: transform 0.3s ease-in-out, height 0.3s ease-in-out;
    overflow: visible; /* allow content to expand when height changes */
}

/* Fallback: allow basic sizing when only search-carousel class is present */
.search-carousel {
    display: block;
}


/* Keep non-first carousel items animating smoothly */
.search-carousel .mud-carousel-item {
    transition: transform 0.3s ease-in-out;
    height: auto !important; /* Allow items to expand to fit content */
}

/* Disable slide-in animation for the first (search box) item only */
.search-carousel .mud-carousel-item:first-child.mud-carousel-transition-slide-next-enter,
.search-carousel .mud-carousel-item:first-child.mud-carousel-transition-slide-prev-enter,
.search-carousel .mud-carousel-item:first-child.mud-carousel-transition-slide-next-enter-active,
.search-carousel .mud-carousel-item:first-child.mud-carousel-transition-slide-prev-enter-active {
    transform: none !important;
    transition: none !important;
}


/* Center the first carousel item’s content and keep it top-aligned (Solution 1) */
.carousel-item-searchbox {
    display: flex;
    justify-content: center;     /* center horizontally */
    align-items: flex-start;     /* start at top */
    box-sizing: border-box;
    padding: 24px;               /* space for shadow */
}

/* Allow shadow overflow around carousel content (Solution 2b) */
.search-carousel .mud-carousel-content {
    overflow: visible !important;
}
.search-carousel .mud-carousel-item {
    overflow: visible;
}

/* =============================
   region Admin Revi Logs - Clear Logs dropdown
   ============================= */

/* Container aligns with existing toolbar chips */
.clear-logs-dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown menu is hidden by default and shown on hover */
.clear-logs-dropdown .menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    min-width: 170px;
    padding: 4px 0;
    background-color: #1e1e2a;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
    z-index: 20;
}

.clear-logs-dropdown:hover .menu {
    display: block;
}

.clear-logs-dropdown .menu button {
    display: block;
    width: 100%;
    padding: 4px 12px;
    text-align: left;
    background: transparent;
    border: none;
    color: inherit;
    cursor: pointer;
}

.clear-logs-dropdown .menu button:hover:enabled {
    background-color: rgba(255, 255, 255, 0.08);
}

/* --------------------------------------------------------------------------
   Search Box Component
   -------------------------------------------------------------------------- */

/* Container for the search box that handles hover state propagation */
.hover-group {
    position: relative;
}

/* Legacy search box class used in SearchView and OptionDetail */
.search-box {
    position: relative;
    background-color: #1D203C !important;
    border: 1px solid var(--mud-palette-lines-default, rgba(0,0,0,0.18)) !important;
    border-radius: 10px;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
    overflow: visible;
}

/* Hover highlight for search box */
.hover-group:hover .search-box,
.search-box--hover {
    border-color: var(--mud-palette-primary) !important;
}

/* Rotating gradient border effect when searching */
.search-box::before {
    --angle: 0deg;
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1px;
    background: conic-gradient(
        from var(--angle),
        rgba(33, 150, 243, 0.9) 0deg,
        rgba(33, 150, 243, 0.9) 60deg,
        transparent 60deg,
        transparent 180deg,
        rgba(33, 150, 243, 0.9) 180deg,
        rgba(33, 150, 243, 0.9) 240deg,
        transparent 240deg,
        transparent 360deg
    );
    -webkit-mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    -webkit-mask-composite: xor;
    mask: linear-gradient(white, white) content-box, linear-gradient(white, white);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
}

.search-box--searching::before {
    opacity: 1;
    animation: spin-angle 4s linear infinite;
}

@keyframes spin-angle {
    to { --angle: 360deg; }
}

/* Main paper container */
.search-box-paper {
    background-color: #1D203C !important;
    /*
       Force consistent initial rendering of the panel tint/blur.
       Some browsers may delay painting `backdrop-filter`/layered backgrounds inside animated/translated containers
       (e.g., carousel) until a scroll-triggered repaint occurs.
       Keep this override scoped to SearchBox only.
    */
    will-change: transform;
    border-radius: 10px;
    position: relative;
    z-index: 1051;
    padding: 16px;
    min-height: 120px;
    padding-bottom: 10px;
    /* Adaptive width: allow shrinking and cap max width */
    min-width: 0;
    border: 1px solid rgb(58, 75, 108);
    box-sizing: border-box;
    width: min(100%, 860px);
    /* Normal layered shadow for natural depth */
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.18),
        0 4px 8px rgba(0, 0, 0, 0.14),
        0 12px 24px rgba(0, 0, 0, 0.10) !important;
    transition: outline-color 200ms ease, box-shadow 200ms ease, transform 200ms ease, z-index 0s linear;
}

/* Focused state: glow using theme primary color and higher stacking to appear above overlay */
.search-box-paper.search-box-paper--focused {
    z-index: 1201; /* above navbar (1100) overlay (1000) but below global modals if any */
    /* Use theme primary color with transparency via color-mix; increase size for a stronger glow */
    border: 1px solid rgb(58, 75, 108);
    box-shadow:
        0 2px 4px rgba(0, 0, 0, 0.20),
        0 8px 16px rgba(0, 0, 0, 0.16),
        0 20px 40px rgba(0, 0, 0, 0.12),
        0 0 0 2px color-mix(in srgb, var(--mud-palette-primary-lighten) 35%, transparent);
}

/* Full-screen dimmer overlay shown when search is focused, with fade transition */
.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1000; /* below navbar (.mudstrap-navbar has 1100) */
    pointer-events: none; /* disabled until visible */
    opacity: 0;
    transition: opacity 200ms ease;
}
.search-overlay.search-overlay--visible {
    opacity: 1;
    pointer-events: auto;
}

/* Text field styling */
.search-text-field {
  border-style: none;
  width: 100%;
  padding-bottom: 30px;
  margin: 0;
}

/* Input field styling - target MudBlazor's internal input */
/* Note: ::deep is only for CSS isolation; not needed in global stylesheet */
.search-text-field input {
  border: none !important;
  box-shadow: none !important;
  outline: none !important;
}

/* Multiline textarea behavior: grow up to 200px then scroll internally */
.search-text-field .mud-input>textarea.mud-input-root {
  max-height: 200px !important;
  overflow-y: auto !important;
  width: 100% !important;
  box-sizing: border-box;
}

/* Bottom left button stack */
.bottom-left-stack {
  position: absolute;
  bottom: 12px;
  left: 12px;
  z-index: 10;
  align-items: center;
}

/* Pro Toggle Button */
.pro-toggle-button {
    border-radius: 50px !important;
}

.pro-toggle-button.primary-gradient {
    color: white !important;
}

/* Standalone primary-gradient for searchbox elements to avoid shared dependency */
.bottom-right-action-stack .primary-gradient:not(.mud-button-disabled),
.pro-toggle-button.primary-gradient:not(.mud-button-disabled) {
    background: linear-gradient(to bottom, rgb(222, 75, 74) 0%, rgb(183, 35, 34) 100%) !important;
    color: white !important;
}

.pro-toggle-button.mud-button-filled-secondary {
    background-color: #FC7023 !important;
    color: white !important;
}

.pro-toggle-button.mud-button-outlined-default {
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Search More Menu */
.search-more-menu {
}

.search-more-menu .mud-button-root {
    border-radius: 50px !important;
    min-width: 32px !important;
    padding: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
}

/* Generation Style Menu */
.generation-style-menu .mud-button-root,
.generation-style-button {
    border-radius: 50px !important;
    padding: 4px 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: rgba(255, 255, 255, 0.7) !important;
    text-transform: none !important;
    font-size: 0.8125rem !important;
    min-width: 64px !important;
}

.generation-style-menu .mud-button-label,
.generation-style-button .mud-button-label {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Generation Style Popover */
.generation-style-popover .mud-paper {
    background-color: #1D203C !important;
    border: 1px solid rgb(58, 75, 108) !important;
}

/* Generation Style Cards */
.generation-style-card {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    padding: 10px 12px;
}

.generation-style-card:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.3);
}

.generation-style-card.selected {
    background-color: rgba(99, 102, 241, 0.2);
    border-color: rgb(99, 102, 241);
}

.generation-style-card-inner {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
}

.generation-style-radio {
    margin-top: 3px;
    flex-shrink: 0;
    accent-color: rgb(99, 102, 241);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.generation-style-card-text {
    display: flex;
    flex-direction: column;
    flex: 1;
}

.search-more-popover .mud-paper {
    background-color: #1D203C !important;
    border: 1px solid rgb(58, 75, 108) !important;
}

.search-more-menu .mud-icon-root {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* Compact button styling */
.compact-button {
    border-radius: 50px;
    transform: scale(1);
    color: var(--mud-palette-primary-lighten);
}

/* Compact button icon spacing */
.bottom-left-stack .mud-button-label {
    color: white !important;
}

.mud-button-label .mud-button-icon-start {
    margin-right: 4px !important;
    margin-left: 4px !important;
}

.mud-button-label .mud-button-icon-end {
    margin-left: 4px !important;
    margin-right: -4px !important;
}

/* Search type button - ensure full width display */
.search-type-button {
  border-radius: 50px;
  transform: scale(1);
  width: 100% !important;
  display: flex !important;
  min-width: 100% !important;
}

/* Submit button and progress indicator positioning */
.bottom-right-action-stack {
  position: absolute;
  bottom: 12px;
  right: 12px;
  transform: scale(0.8);
  z-index: 10;
  align-items: center;
}

.bottom-right-action-stack .primary-gradient {
    color: white !important;
}

.bottom-right-action-stack .primary-gradient:not(.mud-button-disabled) {
    background: linear-gradient(to bottom, rgb(222, 75, 74) 0%, rgb(183, 35, 34) 100%) !important;
}

/* =============================
    region Pricing Section 
   ============================= */
/* header controls */
.pricing-toggle {
    position: relative;
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 90px; /* Increased to accommodate bubble below and margin around it */
}

/* Sliding toggle control for pricing (Monthly/Yearly/Lifetime) */
.pricing-toggle-slider {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
    padding: 4px;
    border-radius: 9999px;
    width: 420px;
    max-width: 95vw;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 6px 20px rgba(0,0,0,0.20);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.pricing-toggle-slider .toggle-option {
    position: relative;
    z-index: 2;
    appearance: none;
    border: none;
    background: transparent;
    cursor: pointer;
    color: rgba(255,255,255,0.85);
    font-weight: 700;
    padding: 10px 12px;
    border-radius: 9999px;
    transition: color 150ms ease;
    font-size: 0.9rem;
}

.pricing-toggle-slider .toggle-option.active {
    color: #ffffff; /* white text atop the gradient thumb */
}

.pricing-toggle-slider .toggle-thumb {
    position: absolute;
    top: 4px;
    bottom: 4px;
    left: 4px;
    width: calc(33.333% - 4px);
    border-radius: 9999px;
    background: linear-gradient(to bottom, rgb(222, 75, 74) 0%, rgb(183, 35, 34) 100%);
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    transition: transform 200ms ease;
}

.pricing-toggle-slider.is-yearly .toggle-thumb {
    transform: translateX(100%);
}

.pricing-toggle-slider.is-lifetime .toggle-thumb {
    transform: translateX(200%);
}

/* Tooltip for yearly savings replaced by bubble */
.yearly-savings-bubble {
    position: absolute;
    bottom: -50px; /* Positioned below the selector */
    left: 50%;
    transform: translateX(-50%);
    background: #2e7d32; /* Green color */
    color: white;
    padding: 6px 14px;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 700;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    pointer-events: none;
    z-index: 100;
}


@media (max-width: 600px) {
    .yearly-savings-bubble {
        font-size: 0.75rem;
        padding: 4px 10px;
    }
}

.pricing-toggle .lifetime-chip {
    display: none;
    align-self: center;
    border-radius: 9999px;
}

/* Pricing Cards – aligned feature rows */
/* Ensure pricing cards use the same radius as the search box (10px) */
.pricing-card {
    border-radius: 10px !important;
    overflow: hidden; /* clip inner borders/badges to the rounded corners */
    margin-inline: 5px; 
}

.pricing-card-header {
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 16px !important; /* Force standard padding to ensure height calculations are consistent */
}

.pricing-price-block {
    height: 60px;
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 1.5rem; /* mb-6 */
}

/* Container for the features list inside each pricing card */
.pricing-features {
    display: flex;
    flex-direction: column;
}

/* Individual row: fixed height so rows line up across columns */
.pricing-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px; /* increased to handle potential two-line text */
    padding: 8px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

/* Remove top border on the first row when needed */
.pricing-row:first-child {
    border-top-color: transparent;
}

/* Muted text helper for unavailable features */
.pricing-row .muted {
    color: rgba(255, 255, 255, 0.5);
}

/* Ensure icons keep consistent sizing without affecting row height */
.pricing-row .mud-icon-root {
    flex: 0 0 auto;
}

/* Pricing Categories (left column + mobile header) */
/* Vertical categories column (desktop/tablet md+) */
.pricing-categories {
    display: flex;
    flex-direction: column;
}

.pricing-categories-col {
    display: none; /* hidden by default; shown on md+ */
}

/* Wrapper without card look; mirrors card content horizontal padding */
.pricing-categories-wrapper {
    background: transparent !important;
    color: #ffffff;
    border: none !important;
    padding: 16px; /* aligns with MudCardContent default padding */
}

/* Horizontal categories header (mobile) */
.pricing-categories-horizontal {
    display: none; /* visible on small screens */
}

.pricing-cat-cell {
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive behavior: show horizontal header on small, vertical column on md+ */
@media (max-width: 959.98px) {
    .pricing-categories-col { display: none !important; }
    .pricing-categories-horizontal {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        margin-bottom: 8px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.12);
        padding-bottom: 8px;
    }
}

@media (min-width: 960px) {
    .pricing-categories-col { display: block !important; }
    .pricing-categories-horizontal { display: none !important; }
}

/* Spacer to align category rows with the first feature row in cards (md+ only) */
.pricing-categories-spacer { height: 0; }
@media (min-width: 960px) {
    /* Fixed header (120px) + Price block (60px) = 180px */
    .pricing-categories-spacer {
        height: 180px;
    }
}
.compact-button {
  border-radius: 50px;
  transform: scale(1);
}

.tld-panel {
  min-width: 560px;
  max-width: 860px;
}

.preset-autocomplete {
  min-width: 280px;
}

.tld-scroll {
  max-height: 420px;
  overflow-y: auto;
  padding-right: 6px;
}

/* Subsearch dialogs (web/trademark): prevent the dialog body from scrolling */
.subsearch-dialog .mud-dialog-content {
  max-height: none !important;
  overflow: hidden !important; /* only the results list should scroll */
}

/* Subsearch dialogs: scroll only the results list, not the whole dialog */
.subsearch-results-scroll {
  /* Keep the list within a sensible height so header/actions don't scroll */
  max-height: min(54vh, 520px);
  overflow-y: auto;
  padding-right: 6px; /* space for scrollbar so text doesn't clip */
}

@media (max-width: 600px) {
  .subsearch-results-scroll {
    max-height: 42vh;
  }
}

/* Chip state borders */
.chip-pref {
  border: 2px solid var(--mud-palette-primary) !important;
}

.chip-en {
  border: 2px solid var(--mud-palette-primary-darken) !important;
}

.chip-dis {
  border: 2px solid var(--mud-palette-grey) !important;
  opacity: 0.7;
}

.unsearched {
  opacity: 0.5;
}


.search-popover-wrapper {
    min-width: 400px;
}

.search-popover-paper.mud-popover,
.search-popover-paper .mud-paper {
    border: 1px solid rgba(0, 0, 0, 0.10) !important;
    border-radius: 10px !important;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.18) !important;
    padding: 4px 0px !important;
    margin-top: 20px !important;
    backdrop-filter: blur(10px) !important;
    background: #1D203C !important;
    -webkit-backdrop-filter: blur(10px) !important;
}

.search-popover-paper.mud-popover .mud-typography,
.search-popover-paper .mud-paper .mud-typography {
    padding: 8px 10px !important;
    /* center text */
    text-align: center;
    color: white !important;
}

/* Intent option rows */
.search-popover-paper.mud-popover .intent-option,
.search-popover-paper .mud-paper .intent-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 10px !important;
    cursor: pointer;
    border-radius: 8px !important;
    background-color: color-mix(in srgb, #1D203C 50%, transparent) !important;
    transition: background-color 120ms ease;
    margin: 10px;
    color: white !important;
}

/* Default highlight for the first option: similar to hover but slightly more transparent */
/*.search-popover-paper.mud-popover .intent-option:first-child,
.search-popover-paper .mud-paper .intent-option:first-child {
    background-color: color-mix(in srgb, var(--mud-palette-primary-lighten) 10%, transparent) !important;
}*/

/* Active/keyboard-selected option */
.search-popover-paper.mud-popover .intent-option.intent-option--active,
.search-popover-paper .mud-paper .intent-option.intent-option--active {
    background-color: color-mix(in srgb, var(--mud-palette-primary-lighten) 30%, transparent) !important;
}

.search-popover-paper.mud-popover .intent-option:hover,
.search-popover-paper .mud-paper .intent-option:hover {
    background-color: color-mix(in srgb, var(--mud-palette-primary-lighten) 40%, transparent) !important;
}

.search-popover-paper.mud-popover .intent-left,
.search-popover-paper .mud-paper .intent-left { font-size: 0.95rem; }
.search-popover-paper.mud-popover .intent-right,
.search-popover-paper .mud-paper .intent-right { 
    color: white !important; 
    /* remove unified pill background so [Enter]/[Alt+N] appear as separate highlighted tokens */
    background-color: transparent; 
    padding: 0; 
    border-radius: 0; 
    font-size: 0.7rem;
    white-space: nowrap; 
}



/* Bracket highlight styling */
.bracket-highlight {
  background: linear-gradient(to bottom, rgb(222, 75, 74) 0%, rgb(183, 35, 34) 100%) !important;
  color: rgba(255, 255, 255, 0.95);
  padding: 3px 5px;
  border-radius: 6px;
}



/* Ensure headline sits above the search overlay and popover */
.headline {
    position: relative;
    z-index: 2000; /* above .search-overlay (1000) and MudBlazor popover (default 1300+) */
}
