/* ============================================
   HTTP/Domain Checker — tool styles
   ============================================ */

/* ── Tool Hero ── */
.tool-hero {
    padding: calc(var(--header-h) + 60px) 0 80px;
    background: var(--bg-hero);
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}
.tool-hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -10%;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--cyan-bg-strong) 0%, transparent 60%);
    pointer-events: none;
}

.tool-hero__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 48px;
}

.tool-hero__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-bottom: 16px;
}
.tool-hero__breadcrumb a { transition: color var(--duration) var(--ease); }
.tool-hero__breadcrumb a:hover { color: var(--cyan); }
.tool-hero__breadcrumb span { color: var(--text-tertiary); }

.tool-hero__title {
    font-size: clamp(1.875rem, 4vw, 3rem);
    margin-bottom: 12px;
}
.tool-hero__desc {
    color: var(--text-secondary);
    font-size: 1.0625rem;
    max-width: 580px;
    line-height: 1.7;
}

.tool-hero__meta {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.tool-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    color: var(--text-tertiary);
}
.tool-meta-item svg { color: var(--cyan); }

.tool-hero__badge-group { display: flex; flex-direction: column; gap: 10px; align-items: flex-end; }

/* ── Main Layout ── */
.tool-layout {
    padding: 60px 0 120px;
}

.tool-body {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

/* ── Card ── */
.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.tool-card__header {
    padding: 22px 28px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.tool-card__title {
    font-size: 1rem;
    font-weight: 600;
}
.tool-card__body { padding: 28px; }

/* ── Input Area ── */
.checker-tabs {
    display: flex;
    gap: 4px;
    padding: 4px;
    background: var(--bg-tertiary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.checker-tab {
    flex: 1;
    padding: 10px 16px;
    border-radius: calc(var(--radius) - 4px);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
    text-align: center;
}
.checker-tab.active {
    background: var(--bg-card);
    color: var(--text-heading);
    box-shadow: var(--shadow-sm);
}
.checker-tab:hover:not(.active) { color: var(--text-heading); }

.checker-panel { display: none; }
.checker-panel.active { display: block; }

.textarea-wrap { position: relative; }
.checker-textarea {
    width: 100%;
    min-height: 200px;
    max-height: 400px;
    padding: 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    resize: vertical;
    transition: border-color var(--duration) var(--ease);
    outline: none;
}
.checker-textarea:focus { border-color: var(--cyan); }
.checker-textarea::placeholder { color: var(--text-tertiary); }

.textarea-counter {
    position: absolute;
    bottom: 12px;
    right: 14px;
    font-size: 0.75rem;
    color: var(--text-tertiary);
    pointer-events: none;
    background: var(--bg-primary);
    padding: 2px 6px;
    border-radius: 4px;
}

/* ── File Upload ── */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius-lg);
    padding: 48px 32px;
    text-align: center;
    cursor: pointer;
    transition: all var(--duration) var(--ease);
    position: relative;
}
.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--cyan);
    background: var(--cyan-bg);
}
.upload-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.upload-zone__icon { margin: 0 auto 16px; color: var(--text-tertiary); }
.upload-zone__title {
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-heading);
}
.upload-zone__hint { font-size: 0.875rem; color: var(--text-tertiary); }
.upload-zone__formats { margin-top: 12px; display: flex; gap: 6px; justify-content: center; }
.format-badge {
    padding: 4px 10px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.upload-status {
    margin-top: 12px;
    padding: 12px 16px;
    background: var(--cyan-bg);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--cyan);
    display: none;
    align-items: center;
    gap: 8px;
}
.upload-status.visible { display: flex; }

/* ── Options ── */
.checker-options {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.checker-option {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9375rem;
    cursor: pointer;
}
.checker-option input[type="checkbox"] {
    width: 18px; height: 18px;
    border: 2px solid var(--border-strong);
    border-radius: 4px;
    cursor: pointer;
    accent-color: var(--cyan);
}

/* ── Action Bar ── */
.checker-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 20px;
}
.checker-count {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

/* ── Progress ── */
.progress-wrap {
    margin-top: 20px;
    display: none;
}
.progress-wrap.visible { display: block; }
.progress-bar-track {
    height: 6px;
    background: var(--bg-tertiary);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 8px;
}
.progress-bar-fill {
    height: 100%;
    background: var(--gradient-brand);
    border-radius: 3px;
    transition: width 0.4s var(--ease-out);
    width: 0%;
}
.progress-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    display: flex;
    justify-content: space-between;
}

/* ── Results ── */
.results-area {
    margin-top: 28px;
}
.results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}
.results-summary {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}
.result-stat {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.875rem;
    font-weight: 500;
}
.result-stat__dot {
    width: 8px; height: 8px;
    border-radius: 50%;
}
.result-stat--ok .result-stat__dot    { background: var(--green); }
.result-stat--warn .result-stat__dot  { background: var(--orange); }
.result-stat--error .result-stat__dot { background: #ef4444; }

.results-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
}
.results-table th {
    padding: 14px 18px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-tertiary);
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border);
}
.results-table td {
    padding: 14px 18px;
    font-size: 0.875rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.results-table tr:last-child td { border-bottom: none; }
.results-table tr:hover td { background: var(--bg-card-hover); }

.result-domain {
    font-family: var(--font-mono);
    font-weight: 500;
    color: var(--text-heading);
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.result-domain a {
    color: inherit;
    transition: color var(--duration) var(--ease);
}
.result-domain a:hover { color: var(--cyan); text-decoration: underline; }

.result-redirect {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
    display: block;
    margin-top: 2px;
    max-width: 240px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Status badges */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}
.status-badge--ok        { background: rgba(0,184,148,0.1); color: var(--green); }
.status-badge--redirect  { background: rgba(0,153,204,0.1); color: var(--cyan); }
.status-badge--ssl_error { background: rgba(225,112,85,0.1); color: var(--orange); }
.status-badge--client_error,
.status-badge--server_error,
.status-badge--unreachable { background: rgba(239,68,68,0.1); color: #ef4444; }
.status-badge--unknown   { background: var(--bg-tertiary); color: var(--text-tertiary); }

.status-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.status-badge--ok .status-dot        { background: var(--green); }
.status-badge--redirect .status-dot  { background: var(--cyan); }
.status-badge--ssl_error .status-dot { background: var(--orange); }
.status-badge--client_error .status-dot,
.status-badge--server_error .status-dot,
.status-badge--unreachable .status-dot { background: #ef4444; }
.status-badge--unknown .status-dot   { background: var(--text-tertiary); }

.result-code {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.9375rem;
}
.code-200 { color: var(--green); }
.code-3xx { color: var(--cyan); }
.code-4xx { color: var(--orange); }
.code-5xx, .code-0 { color: #ef4444; }

.result-time {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    font-family: var(--font-mono);
}
.result-time--fast   { color: var(--green); }
.result-time--medium { color: var(--orange); }
.result-time--slow   { color: #ef4444; }

/* ── Empty state ── */
.results-empty {
    padding: 64px 32px;
    text-align: center;
    color: var(--text-tertiary);
}
.results-empty svg { margin: 0 auto 16px; opacity: 0.3; }
.results-empty p { font-size: 0.9375rem; }

/* ── Skeleton rows ── */
.skeleton-row td { border-bottom: 1px solid var(--border); }
.skeleton {
    height: 18px;
    border-radius: 4px;
    background: linear-gradient(90deg, var(--bg-tertiary) 25%, var(--border) 50%, var(--bg-tertiary) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ── Sidebar ── */
.tool-sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.sidebar-card__title {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 16px;
    color: var(--text-heading);
    display: flex;
    align-items: center;
    gap: 8px;
}
.sidebar-card__title svg { color: var(--cyan); }

.status-legend { display: flex; flex-direction: column; gap: 10px; }
.legend-item { display: flex; align-items: flex-start; gap: 10px; font-size: 0.875rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; margin-top: 4px; }
.legend-dot--ok        { background: var(--green); }
.legend-dot--redirect  { background: var(--cyan); }
.legend-dot--ssl       { background: var(--orange); }
.legend-dot--error     { background: #ef4444; }

.legend-text strong { display: block; margin-bottom: 2px; color: var(--text-heading); }
.legend-text span { color: var(--text-secondary); }

/* Export actions */
.export-actions { display: flex; flex-direction: column; gap: 8px; }

/* ── Filter bar ── */
.filter-bar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}
.filter-btn {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--duration) var(--ease);
    background: var(--bg-card);
}
.filter-btn:hover { border-color: var(--cyan); color: var(--cyan); }
.filter-btn.active { background: var(--cyan); color: #fff; border-color: var(--cyan); }

/* ── Responsive ── */
@media (max-width: 1024px) {
    .tool-body { grid-template-columns: 1fr; }
    .tool-sidebar { order: -1; }
    .tool-hero__inner { grid-template-columns: 1fr; }
    .tool-hero__badge-group { display: none; }
}
@media (max-width: 768px) {
    .results-table { font-size: 0.8125rem; }
    .results-table th, .results-table td { padding: 12px 14px; }
    .checker-actions { flex-direction: column; align-items: stretch; }
}
