:root {
    --primary-blue: #003366;
    --secondary-blue: #0056b3;
    --accent-orange: #ff6600;
    --light-gray: #f5f5f5;
    --medium-gray: #e0e0e0;
    --dark-gray: #333333;
    --white: #ffffff;
}

/* Body styling for fixed header */
body {
    padding-top: 90px; /* Account for fixed header height */
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* remove link color and andd hover */
.a {
    text-decoration: none;
    color: black; 
}
.a :hover {
    text-decoration: none;
    color:black;
    font-weight: bold;}
/* Header Bar */
.header-bar {
    background-color: var(--primary-blue);
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-logo {
    font-size: 1.5rem;
    font-weight: bold;
}

.header-nav {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.header-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

/* Language selector in header */
.language-selector {
    margin-left: 15px;
}

.language-selector select {
    padding: 5px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: white;
    font-size: 14px;
    color: var(--dark-gray);
}

.language-selector select:focus {
    outline: none;
    border-color: var(--secondary-blue);
}

.header-nav a:hover {
    opacity: 0.8;
    text-decoration: underline;
}


/* Dealer Management Specific Styles */
.dealer-management {
    padding: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.dealer-management h1 {
    color: var(--primary-blue);
    margin-bottom: 2rem;
    font-size: 2rem;
    text-align: center;
    position: relative;
    padding-bottom: 1rem;
}

.dealer-management h1::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: var(--accent-orange);
}

/* Card Styles */
.dealer-management .card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2.5rem;
    margin-bottom: 3rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dealer-management .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 25px rgba(0,0,0,0.12);
}

.dealer-management .card h2 {
    color: var(--primary-blue);
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
}

.dealer-management .card h2::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-orange);
    margin-right: 12px;
}

/* Form Styles */

.hano-form .form-group {
    margin-bottom: 1.5rem;
}

.hano-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.hano-form input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}    

.hano-form button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.dealer-form .form-group {
    margin-bottom: 1.5rem;
}

.dealer-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark-gray);
}

.dealer-form input[type="text"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}
.dealer-form input[type="number"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}
.dealer-form input[type="email"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}
.dealer-form input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}
.dealer-form input[type="checkbox"] {
    margin-right: 0.5rem;
}

.dealer-form select {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--medium-gray);
    border-radius: 4px;
    font-size: 1rem;
}

.dealer-form button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.dealer-form button:hover {
    background-color: var(--secondary-blue);
}

/* Table Styles */
.dealers-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.dealers-table th {
    background-color: var(--primary-blue);
    color: white;
    padding: 1rem;
    text-align: left;
}

.dealers-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-gray);
}

.dealers-table tr:hover {
    background-color: rgba(0,51,102,0.05);
}

.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

/* Button Styles */
.btn-detail {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 500;
}

.btn-detail:hover {
    text-decoration: underline;
}
.btn-edit {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}
.btn-delete {
    background-color: #dc3545;
    color: white;
    border: none;
    padding: 0.2rem 1rem;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-delete:hover {
    background-color: #c82333;
}

/* Service List Styles */
.service-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin: 1rem 0;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}


.service-item input[type="radio"] {
    text-align: center;
    display: none;
    margin: 0 auto; /* Optional: space between radio button and label */
    }
.radio-button-group label {
    padding: 10px 20px;
    border: 2px solid #007bff;
    border-radius: 5px;
    cursor: pointer;
    background-color: white;
    color: #007bff;
    transition: all 0.2s ease;
}

.radio-button-group input[type="radio"]:checked + label {
        background-color: #007bff;
        color: white;
    }
/* General styling for the dashboard */
.user-dashboard {
    margin: 20px auto;
    max-width: 1200px;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.user-dashboard h1 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: #333;
}

/* Card styling */
.card {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: #555;
}

/* Table styling */
.dashboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.dashboard-table th,
.dashboard-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

.dashboard-table th {
    background-color: #f4f4f4;
    font-weight: bold;
    color: #333;
}

.dashboard-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.dashboard-table tr:hover {
    background-color: #f1f1f1;
}

/* Button styling (if needed for actions) */
.btn {
    display: inline-block;
    padding: 8px 12px;
    font-size: 0.9rem;
    color: #fff;
    background-color: #007bff;
    border: none;
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
}

.btn:hover {
    background-color: #0056b3;
}

/* Grunnstruktur for form grupper */
.profile .form-group {
    margin-bottom: 1.5rem;
}

/* Flex-oppsett for checkbox-grupper */
.profile .form-check-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* Hver checkbox og label inline */
.profile .form-check {
    display: flex;
    align-items: center;
    position: relative;
    cursor: pointer;
}

/* Skjuler standard checkbox, bruker pseudo-element for tilpasning */
.profile form-check-input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    margin-right: 0.5rem;
    position: relative;
}

/* Når checkbox er valgt */
.profile .form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Custom checkmark med pseudo-element */
.profile .form-check-input:checked::after {
    content: "✓";
    color: white;
    font-size: 14px;
    position: absolute;
    top: 1px;
    left: 5px;
}

/* Hover-effekt */
.profile .form-check-input:hover {
    border-color: #0d6efd;
}

/* Fokus-effekt for tastaturnavigasjon */
.profile .form-check-input:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Label styling */
.profile .form-check-label {
    user-select: none;
    font-size: 0.95rem;
    color: #333;
}

/* Fjerner bullets */
.dealer-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

/* Hver forhandler med checkbox */
.dealer-list li {
    display: flex;
    align-items: center;
    padding-left: 20px; 
    margin-bottom: 10px;
}

/* Justerer spacing mellom checkbox og label */
.dealer-list input[type="checkbox"] {
    margin-right: 8px;
}
/* Mørkt tema (valgfritt) */
@media (prefers-color-scheme: dark) {
    .form-check-input {
        background-color: #222;
        border-color: #555;
    }

    .form-check-label {
        color: #f0f0f0;
    }

    .form-check-input:checked {
        background-color: #0d6efd;
        border-color: #0d6efd;
    }
}

/* Responsiv tilpasning */
@media (max-width: 576px) {
    .form-check-group {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}


@media (max-width: 768px) {
    .dealers-table {
        display: block;
        overflow-x: auto;
    }
    
    .dealer-management {
        padding: 1rem;
    }
}

/* Secondary Button Style */
.btn-secondary {
    background-color: #6c757d;
    color: white;
    padding: 0.2rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: #5a6268;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 0.2rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
    text-decoration: none;
    display: inline-block;
}

.btn-danger:hover {
    background-color: #c82333;
}

.hano_oppgave_valg {
    opacity: 0;
    position: fixed;
    width: 0;
}