﻿/* === Grundläggande tabell och text === */
body {
    font-family: "Inter", "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
    color: #222;
}

table {
    border-collapse: collapse;
    width: 100%;
    margin-bottom: 1rem;
    font-family: sans-serif;
}

th, td {
    border: 1px solid #ccc;
    padding: 8px 12px;
    text-align: left;
}

th {
    background-color: #f5f5f5;
    font-weight: bold;
}

tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* === Drag & Drop === */
.dropzone {
    border: 2px dashed #7aa7ff;
    background: #f7faff;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    cursor: pointer;
    transition: 0.25s ease;
    margin-top: 10px;
}

    .dropzone:hover {
        background: #eef5ff;
        border-color: #4d8bff;
    }

    .dropzone.dragover {
        background: #dceaff;
        border-color: #1a73e8;
        transform: scale(1.02);
    }

.dz-icon {
    font-size: 38px;
    margin-bottom: 8px;
    opacity: 0.7;
}

.dz-text {
    font-size: 14px;
    color: #333;
}

.hidden-file-input {
    display: none;
}

/* === Upload progress === */
.upload-progress {
    width: 100%;
    height: 6px;
    background: #e5e5e5;
    border-radius: 3px;
    margin-top: 10px;
    overflow: hidden;
    display: none;
}

.upload-bar {
    height: 100%;
    width: 0%;
    background: #4d8bff;
    transition: width 0.4s ease;
}

.upload-status {
    margin-top: 6px;
    font-size: 13px;
    color: #333;
}

.upload-preview {
    margin-top: 10px;
    text-align: center;
    height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .upload-preview img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
    }

/* === Collapsible text === */
.conv-block {
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 1em;
    padding: 0.8em;
    background: #fafafa;
}

.conv-header {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    user-select: none;
}

    .conv-header .arrow {
        font-size: 14px; /* justera pilens storlek */
        line-height: 1; /* hindrar pilen från att hoppa uppåt */
    }
    .conv-header .astro-small {
        margin: 0; /* tar bort ev. extra marginaler */
        line-height: 1.4; /* snyggare textlinje */
    }
    .conv-header.open .arrow {
        transform: rotate(90deg);
    }

.conv-body {
    margin-top: 0.8em;
    display: none;
    text-align:left;
}
/* === Ren statisk blocklayout (ej expanderbar) === */
.conv-block-clean {
    background: #f9f9f9; /* samma som conv-block */
    border-radius: 10px;
    padding: 18px 20px; /* lite mer luft än conv-block */
    margin: 20px 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

    .conv-block-clean .astro-h2 {
        margin-bottom: 12px; /* luft under rubriken */
    }

    .conv-block-clean .button-row {
        margin-top: 14px; /* snygg spacing mot input */
    }
/* Speciella css:er */
.privacy-text {
    text-align: left;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* === Rubriker och hero === */
.astro-h1 {
    font-size: 2.2rem; /* lite större */
    font-weight: 700; /* extra bold */
    letter-spacing: -0.5px; /* kompaktare, ser kraftigare ut */
    color: rgba(0,139,139,255);
}

.astro-h2 {
    font-size: 1.35rem;
    font-weight: 600;
    margin: 0;
    display: inline-block;
    color: #222;
}

.astro-h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 0.3em;
    color: #333;
}
.astro-small {
    display: block;
    font-weight: 600;
    font-size: 0.95rem;
    opacity: 1;
    margin-top: 4px;
}

/* Fältrubriker */
.astro-label {
    font-weight: 600; /* lite kraftigare */
    font-size: 1.05rem; /* något större */
    color: #006d6d; /* tydlig kontrast mot text */
    margin-bottom: 4px; /* liten luft under rubriken */
}
/* Fältblock */
.astro-block {
    display: flex;
    align-items: center;
    margin-bottom: 18px; /* blankrad mellan varje fält */
}
/* === Formulär och knappar === */
/* Rubriker till vänster */
.astro-label {
    flex: 0 0 180px; /* fast bredd för rubrik */
    font-weight: 600; /* kraftigare */
    font-size: 1.05rem;
    color: #006d6d;
    text-align: right; /* högerjusterad mot fältet */
    margin-right: 12px;
}
/* Vanlig text i värdefält */
.astro-value {
    color: #004d4d; /* mörkare turkos/grön ton */
    font-weight: 500; /* lite kraftigare */
    font-size: 1.05rem; /* marginellt större */
}

    /* För tomma eller neutrala värden */
    .astro-value.empty {
        color: #006d6d; /* ännu tydligare kontrast */
        font-style: italic; /* diskret stilskillnad */
    }

/* Inputfält till höger och textarea */
/* Standard */
.astro-input {
    flex: 1;
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s ease;
}

/* Textarea-specifik */
textarea.astro-input {
    min-height: 60px;
    resize: vertical;
    line-height: 1.4;
}
/* Gör knapparna lika breda och centrerade */
#astroConfirmModal .button-row {
    display: flex;
    justify-content: center;
    gap: 10px;
}

    #astroConfirmModal .button-row button {
        flex: 1; /* lika breda */
        min-width: 120px; /* valfri minsta bredd */
        padding: 8px 0;
        font-weight: 600;
        border: none;
        border-radius: 6px;
        cursor: pointer;
    }

/* Färger */
#astroConfirmModal .danger {
    background-color: #c0392b;
    color: #fff;
}

#astroConfirmModal .cancel {
    background-color: #008b8b;
    color: #fff;
}
/* Bas för modalknappar – neutraliserar astro-btn */
#astroConfirmModal .astro-btn {
    background-image: none !important; /* ta bort grå gradient */
    border-radius: 6px;
    padding: 8px 14px;
    margin: 4px;
    font-weight: 600;
    border: 1px solid #333;
}

    /* Ja (danger) – röd */
    #astroConfirmModal .astro-btn.danger {
        background-color: #c0392b !important;
        color: #fff !important;
    }

        #astroConfirmModal .astro-btn.danger:hover {
            background-color: #a93226 !important;
        }

    /* Avbryt (neutral grå) */
    #astroConfirmModal .astro-btn.cancel {
        background-color: #bec7d0 !important; /* samma grå som bas */
        color: #000 !important;
    }

        #astroConfirmModal .astro-btn.cancel:hover {
            background-color: #b0b7be !important; /* lite mörkare vid hover */
        }

/* 📱 Mobilvariant */
@media (max-width: 600px) {
    .astro-input {
        font-size: 1.1rem; /* lite större text */
        padding: 14px 16px; /* mer luft */
        min-height: 80px; /* större fält */
    }

    textarea.astro-input {
        min-height: 120px; /* rejäl höjd för frågor */
    }
}
/* MOBILVARIANT */
@media (max-width: 600px) {

    .astro-block {
        display: block; /* rubrik ovanför fält */
    }

    .astro-label {
        text-align: left; /* vänsterställd rubrik */
        margin-bottom: 6px; /* lite luft under rubriken */
        margin-right: 0;
        flex: none;
        font-size: 1.1rem; /* lite större på mobil */
    }
}
/*.astro-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
    background-color: #f9f9f9;
    color: #222;
    box-sizing: border-box;
}

    .astro-input:focus {
        outline: none;
        border-color: rgba(0,139,139,255);
        background-color: #fff;
    }
*/
/*.astro-btn {
    display: inline-flex;*/ /* gör att knappen anpassar sig efter innehållet */
    /*align-items: center;*/ /* centrerar emoji + text vertikalt */
    /*gap: 6px;*/ /* lite luft mellan emoji och text */
    /*background-color: rgba(0,139,139,255);
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    margin: 6px 4px;
    transition: background-color 0.2s ease;
}

    .astro-btn:hover {
        background-color: #007a7a;
    }*/
.astro-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.astro-modal-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    width: 90%;
    max-width: 400px;
}

.astro-modal-header {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.astro-modal-body {
    margin-bottom: 20px;
    font-size: 1rem;
}

.astro-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}
/* === Astro-knappar i btn-link-stil === */
.astro-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #bec7d0;
    background-image: linear-gradient(to top, #d8dee4, #f5f6f7);
    color: #000;
    border: 1px solid #333;
    border-radius: 6px;
    padding: 8px 14px;
    margin: 4px;
    text-decoration: none;
    font-weight: 600;
    font-family: sans-serif;
    transition: background-color 0.2s ease;
    text-align: center;
}

    .astro-btn:hover {
        background-image: linear-gradient(to top, #c0c7ce, #e2e4e6);
    }

    .astro-btn img,
    .astro-btn svg,
    .astro-btn span.icon {
        margin-right: 8px;
    }

    .astro-btn span {
        vertical-align: middle;
        margin-right: 8px;
        border-radius: 3px;
    }

    /* === Danger === */
    .astro-btn.danger {
        background-image: none;
        background-color: #c62828;
        color: #fff;
        border-color: #333;
    }

        .astro-btn.danger:hover {
            background-color: #b71c1c;
        }

    /* === Primary === */
    .astro-btn.primary {
        background-image: none;
        background-color: #0078d4;
        color: #fff;
        border-color: #333;
    }

/* === Radlayout === */
.button-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    align-items: stretch;
}

    .button-row button {
        flex: 0 1 200px;
        min-width: 120px;
        padding: 8px 0;
        font-weight: 600;
        border-radius: 6px;
        cursor: pointer;
    }
.pdf-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
}

.pdf-icon {
    font-size: 20px;
}

.pdf-link {
    color: #0077cc;
    text-decoration: none;
}

.pdf-size {
    opacity: 0.7;
    font-size: 0.85rem;
}

/* Astro-style checkbox */
.astro-check {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

    .astro-check input {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }

    .astro-check .checkmark {
        width: 20px;
        height: 20px;
        background-color: #eee;
        border-radius: 4px;
        display: inline-block;
        transition: 0.2s;
        border: 1px solid #ccc;
    }

    .astro-check input:checked ~ .checkmark {
        background-color: #4CAF50;
        border-color: #4CAF50;
    }

    .astro-check .checkmark:after {
        content: "";
        position: absolute;
        display: none;
    }

    .astro-check input:checked ~ .checkmark:after {
        display: block;
    }

    .astro-check .checkmark:after {
        left: 7px;
        top: 3px;
        width: 5px;
        height: 10px;
        border: solid white;
        border-width: 0 3px 3px 0;
        transform: rotate(45deg);
    }
/* 📱 Global mobilprofil */
@media (max-width: 600px) {

    body {
        font-size: 1.05rem;
        line-height: 1.6;
        padding: 8px;
    }

    table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        font-size: 0.95rem;
    }

    th, td {
        padding: 6px 8px;
        white-space: nowrap; /* undvik brutna kolumnrubriker */
    }

    /* Blocklayout – mer luft, staplat */
    .conv-block,
    .conv-block-clean {
        padding: 14px 12px;
        margin: 12px 0;
    }

    .astro-h1 {
        font-size: 1.6rem;
    }

    .astro-h2 {
        font-size: 1.2rem;
    }

    .astro-h3 {
        font-size: 1.05rem;
    }

    .astro-small {
        font-size: 0.9rem;
    }

    /* Fältblock: rubrik ovanför fält */
    .astro-block {
        display: block;
        margin-bottom: 16px;
    }

    .astro-label {
        text-align: left;
        margin-bottom: 6px;
        margin-right: 0;
        flex: none;
        font-size: 1.05rem;
    }

    .astro-input {
        width: 100%;
        font-size: 1.05rem;
        padding: 12px 14px;
        min-height: 44px; /* fingertappvänligt */
    }

    textarea.astro-input {
        min-height: 120px;
    }

    .astro-value {
        display: block;
        margin-top: 4px;
        font-size: 1.05rem;
    }

    /* Knappar – fullbredd eller nästan fullbredd */
    .button-row {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-top: 16px;
    }

        .button-row button,
        .astro-btn {
            flex: none;
            width: 100%;
            min-width: 0;
        }

    /* Dropzone – större klickyta */
    .dropzone {
        padding: 18px 14px;
        font-size: 0.95rem;
    }

    .dz-icon {
        font-size: 32px;
    }

    /* Modal – fyll mer av skärmen */
    .astro-modal-content {
        width: 95%;
        max-width: none;
        margin: 0 10px;
        padding: 16px;
    }

    .astro-modal-header {
        font-size: 1.2rem;
    }

    .astro-modal-body {
        font-size: 1rem;
    }

    .astro-modal-footer {
        display: flex;
        flex-direction: row; /* ändra från column */
        justify-content: center; /* centrera knapparna */
        gap: 12px; /* luft mellan knapparna */
    }

        .astro-modal-footer .astro-btn {
            width: auto; /* eller ta bort regeln helt */
        }

    /* PDF-rader – stapla snyggt */
    .pdf-row {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        font-size: 0.95rem;
    }
}

