/* ============================================================
   Google Index Checker — Frontend Styles
   Silvery Infotech
   ============================================================ */

:root { --gic-primary: #4F46E5; }

.gic-wrap *,
.gic-wrap *::before,
.gic-wrap *::after { box-sizing: border-box; }

.gic-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    max-width: 780px;
    margin: 32px auto;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(0,0,0,.07);
}

/* ── Header ── */
.gic-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px 32px 20px;
    background: linear-gradient(135deg,#f8faff 0%,#f0f0ff 100%);
    border-bottom: 1px solid #e8eaf6;
}
.gic-header-icon { flex-shrink: 0; }
.gic-title {
    font-size: 22px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px;
}
.gic-subtitle {
    font-size: 14px;
    color: #64748b;
    margin: 0;
}

/* ── Tabs ── */
.gic-tabs {
    display: flex;
    gap: 4px;
    padding: 12px 24px 0;
    border-bottom: 1px solid #e2e8f0;
    background: #fafafa;
}
.gic-tab {
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 500;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    color: #64748b;
    cursor: pointer;
    border-radius: 8px 8px 0 0;
    transition: color .15s, border-color .15s, background .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.gic-tab:hover { color: var(--gic-primary); background: #f0f0ff; }
.gic-tab--active {
    color: var(--gic-primary);
    border-bottom-color: var(--gic-primary);
    background: #fff;
}
.gic-tab-badge {
    font-size: 10px;
    padding: 2px 7px;
    border-radius: 99px;
    background: #e0e7ff;
    color: #3730a3;
    font-weight: 600;
}

/* ── Panels ── */
.gic-panel { padding: 24px 28px; }

/* ── Search Row ── */
.gic-search-row {
    display: flex;
    gap: 10px;
    align-items: center;
}
.gic-input-wrap {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}
.gic-input-icon {
    position: absolute;
    left: 14px;
    display: flex;
    align-items: center;
    pointer-events: none;
}
.gic-input {
    width: 100%;
    padding: 13px 16px 13px 42px;
    font-size: 15px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    transition: border-color .2s, box-shadow .2s, background .2s;
}
.gic-input:focus {
    border-color: var(--gic-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gic-primary) 15%, transparent);
}
.gic-input::placeholder { color: #94a3b8; }

.gic-btn {
    padding: 13px 26px;
    background: var(--gic-primary);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: opacity .2s, transform .1s;
    flex-shrink: 0;
}
.gic-btn:hover { opacity: .9; }
.gic-btn:active { transform: scale(.97); }
.gic-btn:disabled { opacity: .55; cursor: not-allowed; }
.gic-btn--full { width: 100%; justify-content: center; margin-top: 14px; }

@keyframes gic-spin { to { transform: rotate(360deg); } }
.gic-spin-icon { animation: gic-spin 1s linear infinite; }

/* ── Error ── */
.gic-error {
    margin-top: 12px;
    padding: 10px 14px;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #b91c1c;
    font-size: 13px;
}

/* ── Help text ── */
.gic-help {
    font-size: 13px;
    color: #64748b;
    margin: 0 0 12px;
}

/* ── Textarea ── */
.gic-textarea {
    width: 100%;
    padding: 12px 14px;
    font-size: 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 12px;
    outline: none;
    background: #f8fafc;
    color: #0f172a;
    resize: vertical;
    font-family: inherit;
    transition: border-color .2s;
    line-height: 1.7;
}
.gic-textarea:focus {
    border-color: var(--gic-primary);
    background: #fff;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--gic-primary) 15%, transparent);
}

/* ── Result Cards ── */
.gic-result-card {
    margin-top: 20px;
    border-radius: 14px;
    overflow: hidden;
    animation: gic-fadein .3s ease;
    border: 1px solid #e2e8f0;
}
@keyframes gic-fadein { from { opacity:0; transform:translateY(8px); } to { opacity:1; transform:translateY(0); } }

.gic-status-bar {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 22px;
}
.gic-status-bar--indexed { background: linear-gradient(135deg,#dcfce7,#bbf7d0); }
.gic-status-bar--not-indexed { background: linear-gradient(135deg,#fee2e2,#fecaca); }
.gic-status-bar--unknown { background: linear-gradient(135deg,#fef3c7,#fde68a); }

.gic-status-icon { font-size: 36px; flex-shrink: 0; }
.gic-status-title { font-size: 18px; font-weight: 700; margin: 0 0 3px; }
.gic-status-bar--indexed .gic-status-title { color: #14532d; }
.gic-status-bar--not-indexed .gic-status-title { color: #7f1d1d; }
.gic-status-bar--unknown .gic-status-title { color: #78350f; }

.gic-status-url { font-size: 13px; margin: 0; word-break: break-all; opacity: .8; }

.gic-result-meta {
    background: #fff;
    padding: 16px 22px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    border-top: 1px solid #f1f5f9;
}
.gic-meta-item { display: flex; flex-direction: column; gap: 3px; }
.gic-meta-label { font-size: 11px; font-weight: 600; letter-spacing:.06em; text-transform:uppercase; color: #94a3b8; }
.gic-meta-value { font-size: 14px; color: #1e293b; font-weight: 500; word-break: break-word; }

.gic-snippet {
    padding: 14px 22px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 13px;
    color: #475569;
    line-height: 1.6;
}
.gic-snippet strong { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing:.06em; color: #94a3b8; margin-bottom: 4px; }

.gic-result-actions {
    padding: 14px 22px;
    background: #fff;
    border-top: 1px solid #f1f5f9;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.gic-action-btn {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: opacity .15s;
}
.gic-action-btn:hover { opacity: .8; }
.gic-action-btn--primary { background: var(--gic-primary); color: #fff; border: none; }
.gic-action-btn--ghost   { background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }

.gic-cached-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    background: #f0fdf4;
    color: #15803d;
    border: 1px solid #bbf7d0;
    border-radius: 99px;
    padding: 2px 10px;
    margin-left: auto;
}

/* ── Bulk results table ── */
.gic-bulk-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gic-bulk-table th {
    text-align: left;
    padding: 9px 12px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    letter-spacing:.06em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.gic-bulk-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
    color: #1e293b;
}
.gic-bulk-table tr:last-child td { border-bottom: none; }
.gic-bulk-table td:first-child { word-break: break-all; color: #64748b; font-size: 12px; }

.gic-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 600;
}
.gic-pill--yes   { background: #dcfce7; color: #14532d; }
.gic-pill--no    { background: #fee2e2; color: #7f1d1d; }
.gic-pill--error { background: #fef3c7; color: #78350f; }
.gic-pill--unknown { background: #f1f5f9; color: #64748b; }

/* ── Bulk summary bar ── */
.gic-bulk-summary {
    display: flex;
    gap: 16px;
    margin-bottom: 14px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    font-size: 13px;
    flex-wrap: wrap;
}
.gic-bulk-summary span { display: flex; align-items: center; gap: 5px; }

/* ── History ── */
.gic-history-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.gic-history-table th {
    text-align: left;
    padding: 9px 12px;
    background: #f8fafc;
    font-size: 11px;
    font-weight: 600;
    letter-spacing:.06em;
    text-transform: uppercase;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}
.gic-history-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
    vertical-align: middle;
}
.gic-history-table tr:last-child td { border-bottom: none; }
.gic-history-table td:first-child { word-break: break-all; color: #64748b; font-size: 12px; }

/* ── Loading placeholder ── */
.gic-loading-placeholder {
    color: #94a3b8;
    font-size: 14px;
    padding: 24px 0;
    text-align: center;
}

/* ── Footer ── */
.gic-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    background: #f8fafc;
    border-top: 1px solid #f1f5f9;
    font-size: 12px;
    color: #94a3b8;
}

/* ── Responsive ── */
@media (max-width: 560px) {
    .gic-wrap { border-radius: 0; margin: 0; }
    .gic-header { flex-direction: column; text-align: center; padding: 20px 16px 16px; }
    .gic-panel { padding: 18px 16px; }
    .gic-search-row { flex-direction: column; }
    .gic-btn { width: 100%; justify-content: center; }
    .gic-tabs { padding: 10px 12px 0; gap: 2px; }
    .gic-tab { padding: 8px 12px; font-size: 12px; }
    .gic-status-bar { flex-direction: column; text-align: center; }
}
