/* ==========================================================================
   Duplicate Content Checker — dcc-style.css
   Prefix: dcc-
   ========================================================================== */

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

.dcc-wrap {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: #1f2937;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px 48px;
    position: relative;
}

.dcc-main-title    { font-size: 1.55rem; font-weight: 700; color: #111827; margin: 0 0 8px; }
.dcc-main-subtitle { font-size: 0.92rem; color: #6b7280; margin: 0 0 26px; }

/* --------------------------------------------------------------------------
   Layout
   -------------------------------------------------------------------------- */
.dcc-layout {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 24px;
    align-items: start;
}
@media (max-width: 860px) { .dcc-layout { grid-template-columns: 1fr; } }

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.dcc-card {
    background: #fff;
    border: 1px solid #dde3ea;
    border-radius: 10px;
    padding: 22px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}

.dcc-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}

/* --------------------------------------------------------------------------
   Input tabs
   -------------------------------------------------------------------------- */
.dcc-input-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
    margin-bottom: 18px;
}

.dcc-input-tab {
    padding: 8px 18px;
    font-size: 0.88rem;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    color: #6b7280;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.dcc-input-tab:hover        { color: #2563eb; }
.dcc-input-tab-active       { color: #2563eb; border-bottom-color: #2563eb; }

.dcc-input-panel            { display: none; }
.dcc-input-panel-active     { display: block; }

/* --------------------------------------------------------------------------
   Fields
   -------------------------------------------------------------------------- */
.dcc-field { margin-bottom: 16px; }

.dcc-field label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    margin-bottom: 5px;
}

.dcc-req  { color: #e53935; }
.dcc-hint { font-size: 0.75rem; color: #9ca3af; margin: 4px 0 0; }

.dcc-field input[type="url"],
.dcc-field textarea {
    width: 100%;
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
    border: 1.5px solid #d1d5db;
    border-radius: 6px;
    background: #fafafa;
    color: #1f2937;
    transition: border-color 0.2s;
    resize: vertical;
}
.dcc-field input:focus,
.dcc-field textarea:focus {
    outline: none;
    border-color: #2563eb;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.12);
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.dcc-btn-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.dcc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 22px;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: 7px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.dcc-btn-primary { background: #2563eb; color: #fff; border-color: #2563eb; }
.dcc-btn-primary:hover { background: #1d4ed8; border-color: #1d4ed8; }
.dcc-btn-ghost   { background: transparent; color: #6b7280; border-color: #e5e7eb; }
.dcc-btn-ghost:hover { background: #f9fafb; }

/* --------------------------------------------------------------------------
   Error
   -------------------------------------------------------------------------- */
.dcc-error {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 7px;
    color: #991b1b;
    padding: 10px 14px;
    font-size: 0.86rem;
    margin-top: 12px;
}

/* --------------------------------------------------------------------------
   Thresholds / checks card
   -------------------------------------------------------------------------- */
.dcc-checks-card { background: #f8faff; }

.dcc-checks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.dcc-checks-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: #374151;
}

.dcc-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2px 7px;
    border-radius: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}
.dcc-badge-danger   { background: #fee2e2; color: #dc2626; }
.dcc-badge-warning  { background: #fef3c7; color: #d97706; }
.dcc-badge-moderate { background: #ffedd5; color: #c2410c; }
.dcc-badge-low      { background: #e0e7ff; color: #3730a3; }
.dcc-badge-good     { background: #dcfce7; color: #16a34a; }

/* --------------------------------------------------------------------------
   Placeholder
   -------------------------------------------------------------------------- */
.dcc-placeholder {
    text-align: center;
    padding: 40px 20px;
    color: #9ca3af;
}
.dcc-placeholder-icon {
    font-size: 4rem;
    font-weight: 900;
    color: #cbd5e1;
    line-height: 1;
    margin-bottom: 12px;
    font-family: Georgia, serif;
}
.dcc-placeholder p { font-size: 0.9rem; margin: 0; }

/* --------------------------------------------------------------------------
   Score row
   -------------------------------------------------------------------------- */
.dcc-score-row {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.dcc-score-block {
    text-align: center;
    min-width: 90px;
}

.dcc-score-pct {
    font-size: 2.8rem;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}

.dcc-score-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
}

/* Score colours */
.dcc-pct-danger   { color: #dc2626; }
.dcc-pct-warning  { color: #d97706; }
.dcc-pct-moderate { color: #c2410c; }
.dcc-pct-low      { color: #3730a3; }
.dcc-pct-good     { color: #16a34a; }

.dcc-verdict-block { flex: 1; }

.dcc-verdict {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}

.dcc-verdict-detail {
    font-size: 0.85rem;
    color: #4b5563;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   Stats grid
   -------------------------------------------------------------------------- */
.dcc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.dcc-stat-box {
    background: #f8faff;
    border: 1.5px solid #dde3ea;
    border-radius: 8px;
    padding: 12px 14px;
    text-align: center;
}

.dcc-stat-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1d4ed8;
    line-height: 1;
    margin-bottom: 4px;
}

.dcc-stat-lbl {
    font-size: 0.74rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* --------------------------------------------------------------------------
   Shared phrases
   -------------------------------------------------------------------------- */
.dcc-phrases-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f2f5;
}
.dcc-phrases-header .dcc-card-title { margin-bottom: 0; border-bottom: none; padding-bottom: 0; }

.dcc-phrase-count {
    font-size: 0.78rem;
    font-weight: 700;
    padding: 2px 10px;
    border-radius: 12px;
    background: #f3f4f6;
    color: #374151;
}

.dcc-phrase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 12px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 6px;
    margin-bottom: 6px;
    font-size: 0.86rem;
}
.dcc-phrase-item:last-child { margin-bottom: 0; }
.dcc-phrase-text { flex: 1; color: #1f2937; font-style: italic; }
.dcc-phrase-wc   { font-size: 0.75rem; font-weight: 700; color: #d97706; white-space: nowrap; }

.dcc-phrases-empty {
    font-size: 0.88rem;
    color: #6b7280;
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Side-by-side comparison
   -------------------------------------------------------------------------- */
.dcc-compare-legend {
    font-size: 0.82rem;
    color: #6b7280;
    margin: 0 0 12px;
}

.dcc-hl-shared {
    background: #fef9c3;
    color: #854d0e;
    padding: 1px 5px;
    border-radius: 3px;
    font-weight: 600;
}

.dcc-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 600px) { .dcc-compare-grid { grid-template-columns: 1fr; } }

.dcc-compare-col {}

.dcc-compare-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #374151;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f0f2f5;
}

.dcc-compare-body {
    font-size: 0.85rem;
    line-height: 1.7;
    color: #374151;
    max-height: 300px;
    overflow-y: auto;
    word-break: break-word;
}

.dcc-shared-word {
    background: #fef9c3;
    color: #854d0e;
    border-radius: 2px;
    padding: 0 2px;
}

/* --------------------------------------------------------------------------
   Loading overlay
   -------------------------------------------------------------------------- */
.dcc-loading {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.88);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    border-radius: 10px;
    z-index: 10;
    backdrop-filter: blur(2px);
}
.dcc-loading p { font-size: 0.95rem; color: #4b5563; font-weight: 500; margin: 0; }

.dcc-spinner {
    width: 42px; height: 42px;
    border: 4px solid #e5e7eb;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: dcc-spin 0.75s linear infinite;
}
@keyframes dcc-spin { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
    .dcc-card    { padding: 16px 14px; }
    .dcc-btn     { width: 100%; justify-content: center; }
    .dcc-btn-row { flex-direction: column; }
    .dcc-score-row { flex-direction: column; align-items: flex-start; }
}
