/* ==========================================================================
   Home Page Layout Styles
   ========================================================================== */

html, body {
    height: 100vh;
    margin: 0;
    padding: 0;
    overflow: hidden;
}

body {
    display: flex;
    flex-direction: column;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
}

.site-header {
    flex-shrink: 0;
}

.site-layout {
    display: flex;
    flex: 1;
    width: 100%;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
}

.sidebar {
    width: 260px;
    min-width: 260px;
    max-width: 260px;
    background-color: #f3f3f3;
    flex-shrink: 0;
    align-self: stretch;
    border-right: 1px #d8d8d8 solid;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 15px 28px;
    box-sizing: border-box;
    overflow: hidden;
}

.sidebar-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.sidebar-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.main-area-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
    background-color: #ffffff;
    overflow: hidden;
}

.tool-child-header {
    background-color: #f3f3f3;
    border-bottom: 1px #d8d8d8 solid;
    padding: 25px;
    position: relative;
    z-index: 20;
    flex-shrink: 0;
}

.main-scrollable-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
}

.tool-results-area {
    padding: 0;
    flex: 1;
}

.main-scrollable-area footer.main {
    flex-shrink: 0;
    margin-top: auto;
}

/* ==========================================================================
   Fused Search Bar (Mode Switch + Input/Textarea + Check Button)
   ========================================================================== */

.fused-search-bar {
    display: flex;
    align-items: stretch;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
}

.fused-mode-switch {
    display: flex;
    align-items: stretch;
    background-color: #e2e8f0;
    padding: 7px;
    gap: 5px;
    flex-shrink: 0;
    box-sizing: border-box;
}

.fused-search-bar.is-bulk .fused-mode-switch {
    align-self: flex-start;
}

.fused-mode-option {
    border: none;
    background: transparent;
    padding: 0 12px;
    height: 32px;
    font-size: 13px;
    font-weight: 500;
    color: #64748b;
    border-radius: 3px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    box-sizing: border-box;
}

.fused-mode-option:hover:not(.active) {
    color: #0f172a;
    background-color: #cbd5e1;
}

.fused-mode-option.active {
    color: #ffffff;
    background-color: #0066cc;
}

.fused-input-wrap {
    flex: 1;
    display: flex;
    align-items: stretch;
    min-width: 0;
    position: relative;
}

.fused-input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 15px;
    font-family: inherit;
    border: none;
    outline: none;
    background: transparent;
    color: #0f172a;
    box-sizing: border-box;
    transition: box-shadow 0.15s ease;
}

.fused-input:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.fused-textarea {
    width: 100%;
    min-height: 140px;
    padding: 12px 14px;
    font-size: 14.5px;
    font-family: inherit;
    border: none;
    border-left: 1px solid #e2e8f0;
    outline: none;
    background: transparent;
    color: #0f172a;
    resize: vertical;
    box-sizing: border-box;
    line-height: 1.5;
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.fused-textarea:focus {
    box-shadow: inset 0 0 0 2px rgba(0, 102, 204, 0.2);
}

.fused-check-btn {
    border: none;
    background-color: #0066cc;
    color: #ffffff;
    font-size: 15px;
    font-weight: 700;
    padding: 0 24px;
    cursor: pointer;
    font-family: inherit;
    flex-shrink: 0;
    align-self: stretch;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.15s ease-in-out;
}

.fused-check-btn:hover {
    background-color: #0052a3;
}

.smart-detection-wrapper {
    position: relative;
    margin-top: 8px;
    margin-bottom: 4px;
}

.smart-detection-hint {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 13.5px;
    color: #64748b;
}

.smart-detection-btn {
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: #0066cc;
    font-size: 13.5px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
}

.smart-detection-btn:hover {
    color: #004c99;
    background: none;
}

.smart-detection-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    z-index: 100;
    padding: 14px 16px;
    background-color: #ffffff;
    border: 1px solid #64748b;
    border-radius: 2px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12), 0 8px 10px -6px rgba(0, 0, 0, 0.08);
    font-size: 13.5px;
    color: #334155;
    line-height: 1.5;
    max-width: 620px;
    width: max-content;
}

.tooltip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.tooltip-header strong {
    color: #0f172a;
    font-size: 13.5px;
}

.tooltip-close {
    background: none;
    border: none;
    font-size: 18px;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    color: #94a3b8;
}

.tooltip-close:hover {
    color: #334155;
    background: none;
}

.smart-detection-tooltip p {
    margin: 0 0 8px 0;
}

.tooltip-examples {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tooltip-examples code {
    background: #e2e8f0;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 12.5px;
    font-family: monospace;
    color: #0f172a;
}

.extensions-container {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin: 12px 0 0;
}

.extensions-dropdown-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.15s ease-in-out;
}

.extensions-dropdown-btn:hover,
.extensions-dropdown-btn.is-active {
    border-color: #0066cc;
    color: #0066cc;
    background-color: #f8fafc;
}

.extensions-dropdown-btn .dropdown-arrow-icon {
    transition: transform 0.2s ease;
}

.extensions-dropdown-btn.is-active .dropdown-arrow-icon {
    transform: rotate(180deg);
}

.extensions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.extensions label {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
}

.extensions-dropdown-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

/* Floating Extensions Popup (Locked to select button) */
.extensions-floating-popup {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    box-shadow: 0 20px 45px -5px rgba(0, 0, 0, 0.15), 0 8px 16px -4px rgba(0, 0, 0, 0.08);
    width: calc(100vw - 340px);
    max-width: 1000px;
    min-width: 650px;
    min-height: 440px;
    box-sizing: border-box;
    padding: 24px;
}

.extensions-popup-content {
    width: 100%;
    display: flex;
    flex-direction: column;
}

.popup-search-wrap {
    margin-bottom: 14px;
}

.popup-search-input {
    width: 100%;
    padding: 10px 14px;
    font-size: 14.5px;
    font-family: inherit;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.popup-search-input:focus {
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.15);
}

.popup-selected-section {
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-selected-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.popup-section-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0;
}

.popup-reset-btn {
    background: none;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    padding: 3px 9px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    line-height: 1.3;
    transition: all 0.15s ease-in-out;
}

.popup-reset-btn:hover {
    background-color: #f1f5f9;
    border-color: #94a3b8;
    color: #0f172a;
}

.popup-lists-scrollable {
    max-height: 380px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

.popup-lists-scrollable::-webkit-scrollbar {
    width: 6px;
}

.popup-lists-scrollable::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 3px;
}

.popup-category-section {
    margin-bottom: 22px;
}

.popup-category-section:last-child {
    margin-bottom: 8px;
}

.popup-category-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    margin: 0 0 10px 0;
}

.popup-extensions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
    gap: 8px;
}

.popup-ext-item {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 10px;
    background-color: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 13.5px;
    color: #334155;
    cursor: pointer;
    user-select: none;
    transition: all 0.15s ease-in-out;
}

.popup-ext-item:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    color: #0f172a;
}

.popup-ext-item.is-selected {
    background-color: #eff6ff;
    border-color: #93c5fd;
    color: #0066cc;
    font-weight: 600;
}

.popup-ext-item input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

/* Results Table Styling */
.results-table-wrapper {
    margin-top: 0;
    border: none;
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    background-color: #ffffff;
    width: 100%;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.results-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background-color: #f8fafc;
    color: #475569;
    font-size: 13px;
    font-weight: 700;
    padding: 13px 25px;
    border-bottom: 1px solid #e2e8f0;
    letter-spacing: 0.02em;
}

.results-table td {
    padding: 13px 25px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    font-size: 14.5px;
}

.results-table tr:last-child td {
    border-bottom: none;
}

.results-table tr:hover td {
    background-color: #fafbfd;
}

/* Column widths */
.col-domain {
    width: 52%;
}

.col-buy {
    width: 32%;
}

.col-history {
    width: 16%;
}

/* Domain Cell */
.domain-cell-content {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.domain-name-link {
    color: #0f172a;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: color 0.15s ease-in-out;
}

.domain-name-link:hover {
    color: #0066cc;
    text-decoration: underline;
}

.domain-sep {
    color: #94a3b8;
    font-size: 13px;
    margin: 0 2px;
}

.btn-copy {
    background: none;
    border: none;
    padding: 3px 5px;
    margin-left: 2px;
    cursor: pointer;
    color: #94a3b8;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    transition: all 0.15s ease-in-out;
}

.btn-copy:hover {
    color: #2563eb;
    background-color: #eff6ff;
}

.btn-copy.copied {
    color: #16a34a;
    background-color: #f0fdf4;
}

/* Status Badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    font-size: 13.5px;
    font-weight: 700;
}

.status-available {
    color: #16a34a;
}

.status-taken {
    color: #dc2626;
}

.status-for-sale {
    color: #b45309;
    background-color: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 4px;
    padding: 1px 7px;
    font-size: 12px;
}

.status-sep {
    color: #cbd5e1;
    font-weight: normal;
    margin: 0 4px;
}

.status-unknown {
    color: #64748b;
    font-style: italic;
}

.time-tag {
    font-size: 11px;
    color: #94a3b8;
    font-weight: normal;
    margin-left: 3px;
}

/* Buy Links Group */
.buy-links-group {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.btn-buy {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 12.5px;
    font-weight: 700;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

/* GoDaddy (#00838C) */
.btn-godaddy {
    color: #00838c;
    background-color: #f0fdfd;
    border: 1px solid #c2f1f3;
}

.btn-godaddy:hover {
    color: #ffffff;
    background-color: #00838c;
    border-color: #00838c;
}

/* Namecheap (#de3723) */
.btn-namecheap {
    color: #de3723;
    background-color: #fef4f2;
    border: 1px solid #fcd6d0;
}

.btn-namecheap:hover {
    color: #ffffff;
    background-color: #de3723;
    border-color: #de3723;
}

/* Name.com (#005087) */
.btn-namedotcom {
    color: #005087;
    background-color: #f0f7fc;
    border: 1px solid #c8e0f1;
}

.btn-namedotcom:hover {
    color: #ffffff;
    background-color: #005087;
    border-color: #005087;
}

/* Wayback Button & Dash */
.btn-wayback {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 11px;
    font-size: 12.5px;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    background-color: #fff4e6;
    border: 1px solid #ffd8a8;
    transition: all 0.15s ease-in-out;
    white-space: nowrap;
}

.btn-wayback:hover {
    background-color: #ffe8cc;
    border-color: #ffc078;
}

.wb-red {
    color: #ab2e33;
    font-weight: 700;
}

.wb-black {
    color: #111;
    font-weight: 700;
}

.history-dash {
    color: #94a3b8;
    font-weight: bold;
    font-size: 16px;
    padding-left: 10px;
}

.loading-text {
    color: #94a3b8;
    font-size: 13px;
}
