/* General reset and styles */
html,
body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f7fa;
    height: auto;
    overflow-x: hidden;
    /* Förhindrar horisontell scrollbar */
    overflow-y: auto;
    display: block;
    justify-content: center;
    align-items: center;
}

:root {
    --green: #008000;
    --dark-green: #006600;
    --gray: #85888C;
    --dark-gray: #333;
    --white: #ffffff;
    --light-gray: #f4f4f4;
    --highlight: #00ed77;
    --highlight-btn: #00cc66;
    --highlightt2: #08801dcc;
    --nav-width: 250px;
}

/* Container styling */
.registration-container {
    border-radius: 12px;
    padding: 30px 20px;
    width: 100%;
    margin: 20px auto;
    overflow: hidden;
    max-width: 820px;
    text-align: center;
    box-sizing: border-box;
}

.hidden {
    display: none;
}

/* Justera visning av det svenska specifika fältet */
#swedishSpecific {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-in-out;
}

/* Tooltip Container */
.whaticon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 13px;
    color: #fff;
    background-color: #006600;
    margin-left: 5px;
    border-radius: 50%;
    border: 1px solid #333;
    width: 18px;
    height: 18px;
    font-weight: bold;
    text-align: center;
    position: relative;
    /* Needed for tooltip positioning */
}

/* Tooltip Styling */
.whaticon:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 8px;
    border-radius: 5px;
    font-size: 12px;
    white-space: normal;
    /* Allow text wrapping */
    max-width: 250px;
    /* Prevent long tooltips from overflowing */
    text-align: center;
    top: 120%;
    /* Below the icon */
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

/* Ensure tooltip remains visible in smaller screens */
.whaticon:hover::after {
    word-wrap: break-word;
    /* Ensures text wraps properly */
    overflow-wrap: break-word;
}

/* När klassen .show läggs till, expanderar den smidigt */
#swedishSpecific.show {
    max-height: 200px;
    /* Justera efter behov */
}

.registration-logo {
    max-width: 450px;
    margin-bottom: 5%;
    text-align: center;
}

#reginf {
    text-align: left;
    padding-bottom: 5%;
    padding-top: 10px;
}

h2 {
    font-weight: 300;
    margin-bottom: 5%;
}

.star {
    color: red;
}

.checkbox-container {
    display: block;
    align-items: center;
    gap: 8px;
    /* Space between checkbox and label */
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    /* Adjust size */
    height: 18px;
    margin: 0;
    /* Remove default margin */
    accent-color: #008000;
}

.error-message {
    color: #ff4d4f;
    /* Red text for errors */
    font-size: 14px;
    /* Smaller font size */
    margin-top: 5px;
    margin-left: 5px;
    display: block;
    /* Ensure it's always visible */
}


/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    position: relative;
}

@media (max-width: 768px) {
    .progress-bar {
        margin-top: 20%;
    }
}

.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 30px;
    height: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ddd;
    border-radius: 50%;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    transition: background-color 0.3s ease;
}

.progress-step.active .step-number {
    background: #008000;
}

.progress-line {
    position: absolute;
    top: 30%;
    left: 10%;
    width: 80%;
    height: 2px;
    background: #ddd;
    transform: translateY(-50%);
    z-index: 0;
    transition: background-color 0.3s ease;
}

.progress-line.completed {
    background: #008000;
}

.progress-step span {
    margin-top: 8px;
    font-size: 12px;
    color: #555;
}

/* Form steps */
.form-step {
    display: none;
}

.form-step.active {
    display: block;
}

/* Form styling */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

/* Styling the select */
.form-group select {
    width: 100%;
    /* Responsive width */
    padding: 12px 16px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
    color: #333;
    appearance: none;
    /* Remove default browser styles */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="%23333" d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

/* Focus state */
.form-group select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

/* Disabled option */
.form-group select option[disabled] {
    color: #888;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .form-group select {
        font-size: 14px;
        padding: 10px 14px;
    }
}

label {
    display: block;
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    padding: 2px;
}

input {
    width: 95%;
    padding: 10px 10px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #f9f9f9;
    transition: border 0.3s ease;
}

input:focus {
    border-color: #006600;
    background: #fff;
    outline: none;
}

#fo-p {
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    padding: 2px;
}

#comp-p {
    margin-bottom: 5px;
    color: #555;
    font-size: 14px;
    padding: 2px;
}

button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    font-weight: bold;
    color: white;
    background-color: #008000;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s ease;
}

button:hover {
    background-color: #006600;
    transition: 0.2s;
}

/* Buttons in the second step */
.form-buttons {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

button[type="button"] {
    background: #cccccc;
}

button[type="button"]:hover {
    background: #b0b0b0;
}

#nextBtn,
#prevBtn {
    background-color: #008000;
    transition: 0.2s;
}

#nextBtn:hover,
#prevBtn:hover {
    background-color: #006600;
    transition: 0.2s;
}

.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #000;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

#successMessageREG {
    background-color: #b3e6b3;
    color: #008000;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
    display: none;
}

#errorMessageREG {
    color: #721c24;
    background-color: #f8d7da;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
    margin-bottom: 10px;
    margin-top: 10px;
    display: none;
}

.policy-agree {
    display: flex;
    align-items: center;
    gap: 10px;
    /* Mellanrum mellan checkbox och text */
    font-size: 1.1em;
    color: #333;
}

.policy-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #008000;
    /* Grön checkbox vid val */
}

.policy-agree label {
    cursor: pointer;
    display: flex;
    align-items: center;
}

#registerlink {
    color: #008000;
    text-decoration: underline;
    font-weight: 500;
    margin-left: 5px;
    transition: color 0.3s ease;
}

#registerlink:hover {
    color: #006600;
}

.checkerror-message {
    text-align: left;
    font-size: 14px;
    display: none;
}

#registrationModeSelection {
    padding-top: 2%;
}

#typereg {
    font-size: 18px;
    font-weight: 300;
    text-align: center;
}
/* Knappar för val av registreringstyp */
#registrationModeSelection button {
    width: 48%;
    padding: 12px;
    font-size: 16px;
    font-weight: normal;
    color: #fff;
    background-color: var(--green);
    border: 1px solid #ccc;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
}

#registrationModeSelection button:hover {
    background-color: var(--highlightt2);
    border-color: #999;
}

/* Vald knapp (markerad av JS med .selected-button) */
#registrationModeSelection .selected-button {
    background-color: #008000;
    color: white;
    border-color: #006600;
}