/**
 * Custom CSS for Security Scanner
 */

h1, h2, h3, h4, h5 {
    font-family:
            -apple-system,
            BlinkMacSystemFont,
            "Segoe UI",
            Roboto,
            Helvetica,
            Arial,
            sans-serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}



/* Score Circle */
.score-circle {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    font-weight: bold;
    border: 8px solid;
    margin: 0 auto;
}

.score-good {
    color: #28a745;
    border-color: #28a745;
    background: #d4edda;
}

.score-warning {
    color: #ffc107;
    border-color: #ffc107;
    background: #fff3cd;
}

.score-bad {
    color: #dc3545;
    border-color: #dc3545;
    background: #f8d7da;
}

/* Hero Section */
.hero {

    background-image:
            linear-gradient(rgb(3 120 193 / 85%), rgba(75, 152, 162, 0.85)),
            url('/assets/img/hero_bg.webp'); /* Ditt bakgrunnsbilde */
    background-size: cover;      /* Dekker hele området */
    background-position: center; /* Sentrert */
    background-repeat: no-repeat;
    background-attachment: fixed; /* Parallax-effekt (valgfritt) */
    position: relative;
    /*min-height: 200px;          !* Minimum høyde *!*/
}

/* Hero Image - Fyller container uten å bli for stor */
.hero-image {
    width: 100%;           /* Fyller bredden av col-lg-4 */
    height: auto;          /* Beholder bildeproportioner */
    max-width: 100%;       /* Aldri større enn container */
    display: block;        /* Fjerner whitespace under bildet */
    border-radius: 8px;    /* Runde hjørner (valgfritt) */
}

/* Alternativ: Om du vil at bildet skal ha fast høyde */
.hero-image-cover {
    width: 100%;
    height: 400px;         /* Fast høyde */
    object-fit: cover;     /* Dekker hele området, beskjærer om nødvendig */
    border-radius: 8px;
}

/* Alternativ: Om du vil at bildet skal inneholdes helt */
.hero-image-contain {
    width: 100%;
    height: 400px;
    object-fit: contain;   /* Hele bildet vises, kan gi whitespace */
    border-radius: 8px;
}

/* SSL Certificate Box */
.ssl-certificate-box {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-top: 15px;
}

.ssl-certificate-box h6 {
    color: #495057;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 10px;
}

.ssl-certificate-box .table {
    background: white;
    margin-top: 15px;
}

.ssl-certificate-box .table th {
    background-color: #e9ecef;
    font-weight: 600;
    color: #495057;
}

.ssl-certificate-box .alert {
    border-radius: 6px;
}

/* Card Hover Effects */
.card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1) !important;
}

/* Progress Bar Animation */
.progress {
    height: 25px;
    border-radius: 15px;
    overflow: hidden;
}

.progress-bar {
    font-size: 14px;
    line-height: 25px;
}

/* Table Styling - Bedre lesbarhet */
.table code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 90%;
}

.table strong {
    color: #dc3545;
    font-weight: 600;
}

.table-danger {
    background-color: #f8d7da !important;
}

.table td {
    vertical-align: middle;
}

.table small {
    line-height: 1.6;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* --- New report summary header (donut + categories) --- */

.category-card{
    position: relative;
    padding: 14px 14px 16px;
}

.category-icon{
    position: absolute;
    top: -9px;
    left: -15px;
    font-size: 30px;
    line-height: 1;
    opacity: .9;
}

.category-label{
    margin-top: 22px;    /* plass under ikon */
    font-size: 12px;
    color: #495057;
}

.category-score{
    font-size: 22px;
    font-weight: 700;
}



.report-summary .scanned-url{
    word-break: break-all;
}

.summary-score-box{
    min-width: 220px;
}

/* Donut ring using conic-gradient, controlled by --p (0-100) */
.donut{
    width: 290px;
    height: 290px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: conic-gradient(
            #0d6efd calc(var(--p) * 1%),
            #e9ecef 0
    );
}

.donut.score-good{
    background: conic-gradient(#198754 calc(var(--p) * 1%), #e9ecef 0);
}
.donut.score-warning{
    background: conic-gradient(#ffc107 calc(var(--p) * 1%), #e9ecef 0);
}
.donut.score-bad{
    background: conic-gradient(#dc3545 calc(var(--p) * 1%), #e9ecef 0);
}

.donut-inner{
    width: 72%;
    height: 72%;
    background: #fff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px rgba(0,0,0,.06);
}

.donut-score{
    font-size: 28px;
    font-weight: 800;
    line-height: 1.1;
}

.donut-subtext{
    font-size: 12px;
    color: #6c757d;
    margin-top: 2px;
}

/* Category cards */
/* One-line equal-width category boxes */
.category-grid{
    display: flex;
    flex-wrap: nowrap;          /* tving én linje */
    gap: 14px;                  /* likt mellomrom */
    align-items: stretch;
}

.category-card{
    flex: 1 1 0;                /* like bredder */
    max-width: 180px;           /* “kanskje max-width” */
    min-width: 140px;           /* hindrer at de blir for smale */
}



.category-card{
    border-radius: 10px;
    padding: 12px 12px;
    border: 1px solid rgba(0,0,0,.08);
    background: #fff;
}

.category-label{
    font-size: 12px;
    color: #6c757d;
    margin-bottom: 6px;
}

.category-score{
    font-size: 22px;
    font-weight: 800;
}

/* optional “status tint” */
.category-card.cat-good{ background: rgba(25,135,84,.07); border-color: rgba(25,135,84,.18); }
.category-card.cat-warn{ background: rgba(255,193,7,.12); border-color: rgba(255,193,7,.25); }
.category-card.cat-bad { background: rgba(220,53,69,.08); border-color: rgba(220,53,69,.18); }


/* Responsive Adjustments */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }

    .score-circle {
        width: 120px;
        height: 120px;
        font-size: 36px;
    }

    .table {
        font-size: 0.85rem;
    }
    .category-grid{
        flex-wrap: wrap;
    }
    .category-card{
        max-width: none;
        flex: 1 1 160px;
    }
}
