/* ═══════════════════════════════════════════════════════
   24talents Stellenanzeigen-Check – Frontend Styles
   Anpassung an CI: Primär #224B67, Sekundär #FF6F61, Accent #8FB77A
   ═══════════════════════════════════════════════════════ */

/* ── Variables ── */
.sac-wrap {
    /* CI Farben laut Screenshot */
    --sac-teal: #224B67;           /* Primär / Text */
    --sac-teal-light: #EDF4F9;     /* Neues Element #1 (Hintergrund) */
    --sac-teal-dark: #1a3a50;      /* Abgedunkeltes Primär für Hover */
    --sac-red: #FF6F61;            /* Sekundär */
    --sac-red-light: #fff5f4;      /* Sehr helles Coral für Flächen */
    --sac-amber: #f59e0b;          /* Warnung (bleibt systemisch) */
    --sac-amber-light: #fffbeb;
    --sac-green: #8FB77A;          /* Accent (Grün) */
    --sac-green-light: #f1f7ee;    /* Helles Accent-Grün */
    
    /* Graustufen & System */
    --sac-gray-50: #f9fafb;
    --sac-gray-100: #f3f4f6;
    --sac-gray-200: #e5e7eb;
    --sac-gray-300: #d1d5db;
    --sac-gray-400: #9ca3af;
    --sac-gray-500: #6b7280;
    --sac-gray-600: #4b5563;
    --sac-gray-700: #374151;
    --sac-gray-800: #224B67;       /* Primärfarbe für Text */
    --sac-gray-900: #111827;
    
    --sac-radius: 12px;
    --sac-radius-sm: 8px;
    --sac-shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --sac-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --sac-font-display: 'Space Grotesk', system-ui, -apple-system, sans-serif;
    --sac-font-body: 'DM Sans', system-ui, -apple-system, sans-serif;
}

/* ── Reset within our scope ── */
.sac-wrap {
    font-family: var(--sac-font-body);
    color: var(--sac-gray-800);
    line-height: 1.6;
    max-width: 960px;
    margin: 0 auto;
    padding: 0 16px;
}

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

.sac-wrap h2,
.sac-wrap h3,
.sac-wrap h4,
.sac-wrap h5 {
    font-family: var(--sac-font-display);
    margin: 0;
    line-height: 1.3;
}

.sac-wrap p {
    margin: 0;
}

/* ── Sections ── */
.sac-section {
    padding: 40px 0;
}

/* ═══ INPUT SECTION ═══ */
.sac-input-section {
    text-align: center;
    padding: 60px 0 40px;
}

.sac-badge {
    display: inline-block;
    background: var(--sac-red); /* Sekundärfarbe für Aufmerksamkeit */
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 20px;
    margin-bottom: 20px;
}

.sac-headline {
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
    color: var(--sac-teal); /* Primärfarbe */
    margin-bottom: 16px !important;
}

.sac-highlight {
    color: var(--sac-red); /* Sekundärfarbe für Highlights */
}

.sac-subline {
    font-size: 16px;
    color: var(--sac-gray-500);
    max-width: 520px;
    margin: 0 auto 32px !important;
}

.sac-form {
    max-width: 640px;
    margin: 0 auto;
}

.sac-input-row {
    display: flex;
    gap: 12px;
    align-items: stretch;
}

.sac-input-field {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
    background: #fff;
    border: 2px solid var(--sac-gray-200);
    border-radius: var(--sac-radius);
    padding: 0 16px;
    transition: border-color 0.2s;
}

.sac-input-field:focus-within {
    border-color: var(--sac-teal);
}

.sac-input-icon {
    width: 20px;
    height: 20px;
    color: var(--sac-gray-400);
    flex-shrink: 0;
    margin-right: 12px;
}

.sac-input-field input {
    flex: 1;
    border: none;
    outline: none;
    font-family: var(--sac-font-body);
    font-size: 15px;
    padding: 14px 0;
    background: transparent;
    color: var(--sac-gray-800);
    width: 100%;
}

.sac-input-field input::placeholder {
    color: var(--sac-gray-400);
}

.sac-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--sac-teal);
    color: #fff;
    border: none;
    border-radius: var(--sac-radius);
    padding: 14px 24px;
    font-family: var(--sac-font-display);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    white-space: nowrap;
    flex-shrink: 0;
}

.sac-btn-primary:hover {
    background: var(--sac-teal-dark);
}

.sac-btn-primary:active {
    transform: scale(0.98);
}

.sac-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.sac-btn-arrow {
    width: 16px;
    height: 16px;
}

.sac-btn-text {
    display: inline;
}

.sac-hint {
    font-size: 13px;
    color: var(--sac-gray-400);
    margin-top: 12px !important;
}

/* ═══ LOADING SECTION ═══ */
.sac-loading-section {
    text-align: center;
    padding: 80px 0;
}

.sac-scan-circle {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 24px;
}

.sac-scan-ring {
    position: absolute;
    inset: 0;
    border: 3px solid var(--sac-gray-200);
    border-top-color: var(--sac-teal);
    border-radius: 50%;
    animation: sac-spin 1s linear infinite;
}

@keyframes sac-spin {
    to { transform: rotate(360deg); }
}

.sac-scan-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sac-scan-icon svg {
    width: 28px;
    height: 28px;
    color: var(--sac-teal);
}

.sac-scan-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px !important;
}

.sac-scan-steps {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 280px;
    margin: 0 auto;
    text-align: left;
}

.sac-scan-step {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: var(--sac-gray-400);
    transition: color 0.3s;
}

.sac-scan-step.active {
    color: var(--sac-teal);
    font-weight: 500;
}

.sac-scan-step.done {
    color: var(--sac-green);
}

.sac-step-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sac-gray-300);
    flex-shrink: 0;
    transition: background 0.3s;
}

.sac-scan-step.active .sac-step-dot {
    background: var(--sac-teal);
    animation: sac-pulse 1s ease-in-out infinite;
}

.sac-scan-step.done .sac-step-dot {
    background: var(--sac-green);
}

@keyframes sac-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.4); }
}

/* ═══ RESULTS SECTION ═══ */
.sac-results-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 12px;
}

.sac-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    color: var(--sac-gray-600);
    border: 1px solid var(--sac-gray-200);
    border-radius: var(--sac-radius-sm);
    padding: 8px 16px;
    font-family: var(--sac-font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.sac-btn-secondary:hover {
    background: var(--sac-gray-50);
    border-color: var(--sac-gray-300);
}

.sac-analyzed-url {
    font-size: 13px;
    color: var(--sac-gray-500);
}

.sac-analyzed-url a {
    color: var(--sac-teal);
    text-decoration: none;
}

.sac-analyzed-url a:hover {
    text-decoration: underline;
}

/* ── Score Section ── */
.sac-score-section {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 32px;
    background: #fff;
    border-radius: var(--sac-radius);
    box-shadow: var(--sac-shadow);
    margin-bottom: 32px;
}

.sac-score-gauge {
    position: relative;
    width: 120px;
    height: 120px;
    flex-shrink: 0;
}

.sac-gauge-svg {
    width: 120px;
    height: 120px;
}

#sac-gauge-circle {
    transition: stroke-dashoffset 1.5s ease-out, stroke 0.3s;
}

.sac-gauge-value {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#sac-score-number {
    font-family: var(--sac-font-display);
    font-size: 32px;
    font-weight: 700;
    line-height: 1;
}

.sac-gauge-label {
    font-size: 12px;
    color: var(--sac-gray-400);
}

.sac-score-info {
    flex: 1;
}

.sac-score-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 12px;
    margin-bottom: 8px;
}

.sac-score-badge.sac-badge-green {
    background: var(--sac-green-light);
    color: var(--sac-green);
}

.sac-score-badge.sac-badge-amber {
    background: var(--sac-amber-light);
    color: var(--sac-amber);
}

.sac-score-badge.sac-badge-red {
    background: var(--sac-red-light);
    color: var(--sac-red);
}

.sac-score-headline {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 12px !important;
}

.sac-score-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.sac-stat {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    font-weight: 500;
}

.sac-stat-pass { color: var(--sac-green); }
.sac-stat-fail { color: var(--sac-red); }
.sac-stat-warn { color: var(--sac-amber); }

/* ── LLM Summary ── */
.sac-llm-summary {
    display: flex;
    gap: 16px;
    padding: 20px;
    background: var(--sac-teal-light); /* Neues Element #1 Hintergrund */
    border: 1px solid var(--sac-gray-200);
    border-radius: var(--sac-radius);
    margin-bottom: 32px;
}

.sac-llm-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background: var(--sac-teal);
    color: #fff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sac-llm-content {
    font-size: 14px;
    line-height: 1.6;
}

.sac-llm-content strong {
    color: var(--sac-teal);
}

.sac-llm-content p {
    margin-top: 4px !important;
    color: var(--sac-gray-600);
}

/* ═══ PHONE FRAMES ═══ */
.sac-previews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 40px;
}

.sac-preview-column {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.sac-preview-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px !important;
    color: var(--sac-gray-700);
}

.sac-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.sac-dot-blue { background: #3b82f6; }
.sac-dot-green { background: var(--sac-green); }
.sac-dot-red { background: var(--sac-red); }
.sac-dot-teal { background: var(--sac-teal); }

.sac-phone-frame {
    width: 100%;
    max-width: 320px;
    background: var(--sac-teal); /* Primärfarbe für das Gehäuse */
    border-radius: 36px;
    padding: 8px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.15), 0 0 0 1px rgba(255,255,255,0.1) inset;
}

.sac-phone-notch {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 20px 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
}

.sac-phone-icons {
    display: flex;
    gap: 4px;
    align-items: center;
}

.sac-phone-screen {
    background: #fff;
    border-radius: 28px;
    overflow: hidden;
    min-height: 420px;
}

/* ── Google UI inside phone ── */
.sac-g-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px 8px;
}

.sac-g-hamburger {
    flex-shrink: 0;
}

.sac-g-logo {
    flex-shrink: 0;
}

.sac-g-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4285f4, #34a853);
    flex-shrink: 0;
}

.sac-g-searchbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 8px;
    padding: 10px 14px;
    background: #f1f3f4;
    border-radius: 24px;
    font-size: 13px;
    color: var(--sac-gray-700);
}

.sac-g-search-text {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 13px;
}

.sac-g-tabs {
    display: flex;
    gap: 0;
    padding: 0 12px;
    border-bottom: 1px solid #e8eaed;
    overflow-x: auto;
}

.sac-g-tab {
    padding: 8px 14px;
    font-size: 12px;
    color: #5f6368;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    cursor: default;
}

.sac-g-tab.active {
    color: #1a73e8;
    border-bottom-color: #1a73e8;
    font-weight: 500;
}

/* ── Search Result ── */
.sac-g-result {
    padding: 16px;
}

.sac-g-result-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.sac-g-favicon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--sac-gray-100);
    flex-shrink: 0;
}

.sac-g-result-site {
    flex: 1;
    min-width: 0;
}

.sac-g-domain {
    display: block;
    font-size: 12px;
    color: #202124;
    font-weight: 400;
    line-height: 1.3;
}

.sac-g-breadcrumb {
    display: block;
    font-size: 11px;
    color: #4d5156;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sac-g-dots {
    flex-shrink: 0;
}

.sac-g-title {
    font-size: 16px;
    font-weight: 400;
    color: #1a0dab;
    line-height: 1.3;
    margin-bottom: 6px !important;
    font-family: Arial, sans-serif;
}

.sac-g-description {
    font-size: 13px;
    color: #4d5156;
    line-height: 1.5;
    font-family: Arial, sans-serif;
}

/* ── Placeholder results ── */
.sac-g-placeholder {
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sac-g-ph-line {
    height: 10px;
    background: #f1f3f4;
    border-radius: 4px;
}

/* ── Google for Jobs content ── */
.sac-jobs-card {
    margin: 12px;
    border: 1px solid #dadce0;
    border-radius: 12px;
    overflow: hidden;
}

.sac-jobs-card-header {
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid #e8eaed;
}

.sac-jobs-google-icon {
    width: 24px;
    height: 24px;
}

.sac-jobs-card-header span {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.sac-jobs-item {
    padding: 14px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.sac-jobs-item:last-child {
    border-bottom: none;
}

.sac-jobs-item-title {
    font-size: 14px;
    font-weight: 500;
    color: #1a73e8;
    margin-bottom: 4px;
}

.sac-jobs-item-company {
    font-size: 12px;
    color: #202124;
    margin-bottom: 2px;
}

.sac-jobs-item-meta {
    font-size: 11px;
    color: #70757a;
}

.sac-jobs-not-listed {
    padding: 32px 16px;
    text-align: center;
}

.sac-jobs-not-listed-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--sac-red-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sac-red);
}

.sac-jobs-not-listed h4 {
    font-size: 15px;
    color: var(--sac-red);
    margin-bottom: 8px !important;
}

.sac-jobs-not-listed p {
    font-size: 12px;
    color: var(--sac-gray-500);
    max-width: 220px;
    margin: 0 auto !important;
}

.sac-jobs-listed {
    padding: 32px 16px;
    text-align: center;
}

.sac-jobs-listed-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 12px;
    background: var(--sac-green-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--sac-green);
}

.sac-jobs-listed h4 {
    font-size: 15px;
    color: var(--sac-green);
    margin-bottom: 8px !important;
}

.sac-jobs-listed p {
    font-size: 12px;
    color: var(--sac-gray-500);
}

.sac-jobs-footer {
    padding: 8px 16px;
    font-size: 11px;
    color: #70757a;
    text-align: center;
}

/* ═══ CHECKLIST ═══ */
.sac-checklist-section {
    margin-bottom: 40px;
}

.sac-check-group {
    background: #fff;
    border-radius: var(--sac-radius);
    box-shadow: var(--sac-shadow);
    padding: 20px;
    margin-bottom: 16px;
}

.sac-check-group-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.sac-check-group-header h5 {
    font-size: 15px;
    font-weight: 600;
}

.sac-check-group-count {
    font-size: 13px;
    color: var(--sac-gray-400);
    font-weight: 500;
}

.sac-check-group-desc {
    font-size: 13px;
    color: var(--sac-gray-500);
    margin-bottom: 16px !important;
}

.sac-checks-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sac-check-item {
    display: flex;
    gap: 12px;
    padding: 12px;
    border-radius: var(--sac-radius-sm);
    background: var(--sac-teal-light); /* Hintergrund Element #1 */
    transition: background 0.2s;
}

.sac-check-item:hover {
    background: var(--sac-gray-100);
}

.sac-check-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: 2px;
}

.sac-check-icon.pass {
    background: var(--sac-green-light);
    color: var(--sac-green);
}

.sac-check-icon.fail {
    background: var(--sac-red-light);
    color: var(--sac-red);
}

.sac-check-icon.warning {
    background: var(--sac-amber-light);
    color: var(--sac-amber);
}

.sac-check-content {
    flex: 1;
    min-width: 0;
}

.sac-check-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--sac-teal); /* Primärfarbe für Labels */
    margin-bottom: 2px;
}

.sac-check-label .sac-status-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    padding: 1px 8px;
    border-radius: 8px;
    margin-left: 8px;
    vertical-align: middle;
}

.sac-status-tag.pass {
    background: var(--sac-green-light);
    color: var(--sac-green);
}

.sac-status-tag.fail {
    background: var(--sac-red-light);
    color: var(--sac-red);
}

.sac-status-tag.warning {
    background: var(--sac-amber-light);
    color: var(--sac-amber);
}

.sac-check-detail {
    font-size: 13px;
    color: var(--sac-gray-600);
    line-height: 1.5;
    word-break: break-word;
}

/* ── LLM Score Bar ── */
.sac-llm-score-bar {
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sac-llm-bar-track {
    flex: 1;
    height: 6px;
    background: var(--sac-gray-200);
    border-radius: 3px;
    overflow: hidden;
    max-width: 120px;
}

.sac-llm-bar-fill {
    height: 100%;
    background: var(--sac-green); /* Accent Grün für Fortschritt */
    border-radius: 3px;
    transition: width 0.8s ease-out;
}

.sac-llm-bar-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--sac-gray-500);
}

/* ═══ CTA SECTION ═══ */
.sac-cta-section {
    background: linear-gradient(135deg, var(--sac-teal), var(--sac-teal-dark));
    border-radius: var(--sac-radius);
    padding: 40px 32px;
    text-align: center;
    color: #fff;
}

.sac-cta-headline {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px !important;
    color: #FF6F61 !important;
}

.sac-cta-subtext {
    font-size: 15px;
    color: rgba(255,255,255,0.85);
    max-width: 480px;
    margin: 0 auto 24px !important;
}

.sac-btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: var(--sac-teal);
    border: none;
    border-radius: var(--sac-radius);
    padding: 14px 28px;
    font-family: var(--sac-font-display);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.sac-btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    color: var(--sac-teal);
    text-decoration: none;
}

/* ═══ RESPONSIVE ═══ */
@media (max-width: 768px) {
    .sac-input-row {
        flex-direction: column;
    }

    .sac-previews-grid {
        grid-template-columns: 1fr;
    }

    .sac-score-section {
        flex-direction: column;
        text-align: center;
    }

    .sac-score-stats {
        justify-content: center;
    }

    .sac-phone-frame {
        max-width: 280px;
    }
}

@media (max-width: 480px) {
    .sac-wrap {
        padding: 0 12px;
    }

    .sac-input-section {
        padding: 40px 0 24px;
    }

    .sac-headline {
        font-size: 24px;
    }

    .sac-cta-section {
        padding: 32px 20px;
    }
}