* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Follomarkas Venner fargepalett */
    --primary-color: #2f4f2f;
    --primary-hover: #1e3a1e;
    --secondary-color: #c1d2ba;
    --accent-color: #c1d2ba;
    --danger-color: #dc3545;
    --success-color: #28a745;
    --text-color: #334155;
    --heading-color: #1e293b;
    --border-color: #D1D5DB;
    --background-color: #F0F5FA;
    --card-background: #ffffff;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.65;
    padding: 20px;
    font-weight: 400;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--card-background);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

header .logo {
    max-width: 123px;
    height: auto;
    margin-bottom: 20px;
}

header h1 {
    color: var(--heading-color);
    font-size: 2rem;
    margin-bottom: 10px;
    font-weight: 600;
}

header p {
    color: var(--text-color);
    font-size: 1.1rem;
}

.form-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.form-section h2 {
    color: var(--heading-color);
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 20px;
}

.form-group-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-color);
}

input[type="text"],
input[type="email"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

input[type="file"] {
    display: block;
    width: 100%;
    padding: 10px;
    border: 2px dashed var(--border-color);
    border-radius: 6px;
    cursor: pointer;
    background-color: #fafafa;
}

input[type="file"]:hover {
    border-color: var(--primary-color);
    background-color: #f0f0f0;
}

small {
    display: block;
    margin-top: 8px;
    color: #666;
    font-size: 0.9rem;
}

.btn-primary,
.btn-secondary {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 79, 47, 0.3);
}

.btn-primary:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--text-color);
}

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

.btn-full-width {
    width: 100%;
}

.form-actions {
    margin-top: 30px;
}

.location-info {
    margin: 15px 0;
    padding: 15px;
    background-color: var(--background-color);
    border-left: 4px solid var(--primary-color);
    border-radius: 4px;
    display: none;
}

.location-info.active {
    display: block;
}

.location-info p {
    margin: 5px 0;
    font-size: 0.95rem;
}

.location-info strong {
    color: var(--primary-color);
}

#locationStatus {
    font-size: 0.9rem;
    color: #666;
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.image-preview-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.image-preview-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    display: block;
}

.image-preview-item .remove-image {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: var(--danger-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.image-preview-item .remove-image:hover {
    transform: scale(1.1);
}

.form-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 6px;
    display: none;
    text-align: center;
    font-weight: 500;
}

.form-message.success {
    display: block;
    background-color: var(--background-color);
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.form-message.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Modal styling */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: block;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    width: 90%;
    max-width: 900px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #ddd;
}

.modal-header h3 {
    margin: 0;
    color: var(--primary-color);
}

.close {
    font-size: 2rem;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
    transition: color 0.3s ease;
}

.close:hover {
    color: #000;
}

.modal-body {
    padding: 1.5rem;
}

#map {
    height: 500px;
    width: 100%;
    border-radius: 8px;
    border: 2px solid #ddd;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    padding: 1.5rem;
    border-top: 1px solid #ddd;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Spinner for lasting */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsivt design */
@media (max-width: 750px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5rem;
    }

    header p {
        font-size: 1rem;
    }

    .form-section h2 {
        font-size: 1.2rem;
    }

    .image-preview {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    }

    .image-preview-item img {
        height: 100px;
    }

    .modal-content {
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-header {
        flex-shrink: 0;
    }
    
    .modal-body {
        flex: 1;
        padding: 0;
        display: flex;
        flex-direction: column;
    }
    
    #map {
        height: 100%;
        border-radius: 0;
        border: none;
    }
    
    .modal-footer {
        flex-shrink: 0;
    }
    
    .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.5rem;
    }
}
