@charset "UTF-8";

/*
 Theme Name: Smidigdrift Child Theme
 Template: twentytwentyfive
 Version: 1.2
*/

/* --------------------------------------------------------------
   FONTER & BASISLAYOUT
-------------------------------------------------------------- */

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #111827;
    margin: 0;
    padding: 0;
}

/* --------------------------------------------------------------
   KAMPANJE-DETALJER (enkel styling for kampanjesiden)
-------------------------------------------------------------- */

.sd-container {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px 40px;
}

.sd-header-logo {
    width: 180px;
    margin: 0 auto 30px;
    text-align: center;
}

.sd-header-logo img {
    width: 180px;
    height: auto;
    display: block;
    margin: 0 auto;
}

.sd-post-title {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    text-align: center;
}

.sd-kampanje-navn {
    font-size: 1.7rem;
    font-weight: 600;
    margin-bottom: 10px;
    text-align: center;
}

.sd-kort-beskrivelse {
    font-size: 1.1rem;
    color: #444;
    margin-bottom: 24px;
    text-align: center;
}

.sd-fremhevet img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 20px auto 40px;
    border-radius: 6px;
}

.sd-hovedinnhold {
    font-size: 1.05rem;
    line-height: 1.6;
    color: #222;
    margin-bottom: 36px;
}

.sd-kampanje-footer {
    border-top: 1px solid #e5e5e5;
    padding-top: 16px;
    font-size: 0.9rem;
    color: #777;
    text-align: center;
}

/* --------------------------------------------------------------
   DASHBOARD WRAPPER
-------------------------------------------------------------- */

.sd-dashboard {
    max-width: 1100px;
    margin: 40px auto 60px;
    padding: 0 20px 40px;
}

.sd-dashboard-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 10px;
}

.sd-dashboard-subtitle {
    font-size: 1.05rem;
    text-align: center;
    color: #4b5563;
    margin-bottom: 32px;
}

/* --------------------------------------------------------------
   LOGO-RAD (KUNDELOGO + TEKST)
-------------------------------------------------------------- */

.sd-logo-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 20px;
    gap: 16px;
}

.sd-logo-row img {
    max-height: 46px;
    width: auto;
    display: block;
}

.sd-logo-row span {
    font-size: 0.95rem;
    color: #6b7280;
}

/* --------------------------------------------------------------
   GRID FOR KORT PÅ DASHBOARD
-------------------------------------------------------------- */

.sd-dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

/* --------------------------------------------------------------
   STANDARDKORT
-------------------------------------------------------------- */

.sd-card {
    display: block;
    background: #ffffff;
    border-radius: 14px;
    padding: 18px 20px;
    text-decoration: none;
    color: #111827;
    border: 1px solid #e0e7ff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease,
        border-color 0.15s ease,
        background 0.15s ease;
}

/* Tittel & tekst i kort */

.sd-card h2 {
    font-size: 1.2rem;
    margin: 0 0 6px;
    font-weight: 600;
}

.sd-card p {
    font-size: 0.95rem;
    margin: 0;
    color: #4b5563;
}

/* Hover-effekt – Smidigdrift-look */

.sd-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.10);
    border-color: #6366f1;
}

/* --------------------------------------------------------------
   PRIMÆRT KORT (AI-ASSISTENT)
-------------------------------------------------------------- */

.sd-card-primary {
    border-color: #6366f1;
    background: radial-gradient(circle at top left, #6366f1, #3b82f6);
    color: #ffffff;
}

.sd-card-primary h2,
.sd-card-primary p {
    color: #ffffff;
}

.sd-card-primary:hover {
    border-color: #4f46e5;
}

/* --------------------------------------------------------------
   SEKUNDÆRT KORT (KAMPANJER)
-------------------------------------------------------------- */

.sd-card-secondary {
    border-color: #7c3aed;
}

.sd-card-secondary:hover {
    border-color: #a855f7;
}

/* --------------------------------------------------------------
   NØYTRALE KORT (MIN BEDRIFT / PROFIL)
-------------------------------------------------------------- */

.sd-card-neutral {
    /* egen klasse for finpuss senere om ønskelig */
}

/* --------------------------------------------------------------
   RESPONSIV LAYOUT
-------------------------------------------------------------- */

@media (max-width: 960px) {
    .sd-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .sd-dashboard {
        margin-top: 20px;
    }

    .sd-dashboard-title {
        font-size: 1.8rem;
    }

    .sd-dashboard-grid {
        grid-template-columns: 1fr;
    }
}
/* --------------------------------------------------------------
   AI-ASSISTENT SIDE
-------------------------------------------------------------- */

/* YTTERST: WRAPPER – samme logikk som .sd-dashboard */
.sd-ai-wrapper {
    max-width: 1100px;
    margin: 40px auto 60px;
    padding: 0 20px 40px;
}

/* SELVE AI-SEKSJONEN FYLLER HELE WRAPPEREN */
.sd-ai {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Topptekst */

.sd-ai-header {
    text-align: center;
    margin-bottom: 28px;
}

.sd-ai-header h1 {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.sd-ai-header p {
    font-size: 1rem;
    color: #4b5563;
    max-width: 640px;
    margin: 0 auto;
}

/* Layout: chat (venstre) + forhåndsvisninger (høyre) */

.sd-ai-grid {
    width: 100%;
    margin-top: 10px;
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr); /* chat bredere */
    gap: 28px;
    align-items: flex-start;
}

/* Kort / generelt kortoppsett */

.sd-ai-card {
    width: 100%;              /* fyll hele kolonnen */
    margin: 0;                /* ingen auto-marg fra temaet */
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #e5e7f5;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.07);
    padding: 18px 20px 20px;
}

.sd-ai-card,
.sd-ai-card * {
    box-sizing: border-box;
}

/* Chat-kort (venstre) */

.sd-ai-chat-card {
    display: flex;
    flex-direction: column;
    min-height: 420px;
    background: radial-gradient(circle at top, #f5f3ff 0, #ffffff 55%);
}

.sd-ai-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.sd-ai-card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.sd-ai-status {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 999px;
    background: #eef2ff;
    color: #4f46e5;
    white-space: nowrap;
}

/* Chat-bobler */

.sd-ai-bubbles {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
}

.sd-ai-bubble {
    max-width: 100%;
    padding: 9px 12px;
    border-radius: 18px;
    font-size: 0.92rem;
    line-height: 1.45;
}

.sd-ai-bubble p {
    margin: 2px 0 0;
}

.sd-ai-bubble-assistant {
    align-self: flex-start;
    background: #eef2ff;
    border: 1px solid #e0e7ff;
}

.sd-ai-bubble-user {
    align-self: flex-end;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.sd-ai-bubble-label {
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    margin-bottom: 2px;
}

/* Skjema / input nederst i chat-kortet */

.sd-ai-form {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sd-ai-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: #374151;
}

.sd-ai-textarea {
    width: 100%;
    max-width: 100%;
    display: block;
    border-radius: 10px;
    border: 1px solid #d1d5db;
    padding: 10px 11px;
    font-size: 0.95rem;
    resize: vertical;
    min-height: 90px;
    font-family: inherit;
}

.sd-ai-textarea:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 1px rgba(79, 70, 229, 0.3);
}

.sd-ai-textarea:disabled {
    background: #f9fafb;
    color: #9ca3af;
    cursor: not-allowed;
}

.sd-ai-form .sd-btn.sd-btn-primary.sd-btn-full {
    margin-top: 2px;
}

.sd-ai-form button[disabled] {
    opacity: 0.75;
    cursor: not-allowed;
}

.sd-ai-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 2px;
}

/* SIDEKOLONNE – forhåndsvisninger (høyre) */

.sd-ai-side {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sd-ai-preview-card h3 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Forhåndsvisningsrammer */

.sd-ai-preview-frame {
    border-radius: 16px;
    border: 1px dashed #d1d5db;
    background: radial-gradient(circle at top left, #f5f3ff 0, #f9fafb 50%, #ffffff 100%);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.sd-ai-preview-frame-landscape {
    min-height: 190px;
    aspect-ratio: 16 / 9;
}

.sd-ai-preview-frame-vertical {
    min-height: 360px;
    aspect-ratio: 9 / 16;
}

.sd-ai-preview-placeholder {
    font-size: 0.85rem;
    color: #6b7280;
    line-height: 1.4;
    padding: 8px;
}

.sd-ai-preview-note {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 8px;
}

/* Responsiv tilpasning */

@media (max-width: 780px) {
    .sd-ai-grid {
        grid-template-columns: 1fr;
        max-width: 100%;
        align-items: stretch;
    }

    .sd-ai-bubble {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .sd-ai-wrapper {
        margin-top: 28px;
        margin-bottom: 40px;
        padding: 0 14px 28px;
    }

    .sd-ai-card {
        padding: 14px 14px 16px;
        border-radius: 16px;
    }

    .sd-ai-header h1 {
        font-size: 1.6rem;
    }
}
/* --------------------------------------------------------------
   TVING JUSTERING FOR AI-ASSISTENT
   (overstyrer tema / blokkoppsett)
-------------------------------------------------------------- */

/* Sørg for at AI-seksjonen ikke henger ute til høyre */
.sd-ai-wrapper {
    width: 100%;
    display: flex !important;
    justify-content: center !important;   /* sentrer hele AI-blokken i innholdet */
}

/* AI-blokken skal være normal bredde og ikke dyttes av margins */
.sd-ai {
    max-width: 1100px;
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Bruk FLEX i stedet for grid for å være sikker på to kolonner */
.sd-ai-grid {
    display: flex !important;
    flex-direction: row;
    align-items: flex-start;
    gap: 28px;
}

/* Chat til venstre, forhåndsvisning til høyre */
.sd-ai-chat-card {
    flex: 1.7 1 0;
}

.sd-ai-side {
    flex: 1 1 0;
}

/* På mobil skal de under hverandre */
@media (max-width: 780px) {
    .sd-ai-grid {
        flex-direction: column;
    }
}
