/* ============================
   BASSTILAR
============================ */

body {
    margin: 0;
    font-family: "Inter", sans-serif;
    background: #1a1a1a url('https://www.transparenttextures.com/patterns/wood-pattern.png');
    color: #f2f2f2;
}

.page-wrapper {
    padding-left: 20px;
    padding-right: 20px;
    padding-bottom: 80px;
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .page-wrapper {
        padding-left: 50px;
        padding-right: 50px;
    }
}

/* ============================
   HEADER
============================ */

header {
    background: #2e2416;
    padding: 30px;
    text-align: center;
    color: #f7d08a;
    border-bottom: 4px solid #c89b3c;
}

.header-logo {
    width: 140px;
    height: auto;
    display: block;
    margin: 0 auto 10px auto;
}

h1 {
    margin: 0;
    font-size: 30px;
    letter-spacing: 1px;
}

.section-title {
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    margin: 20px 0 30px 0;
    color: #333;
    text-shadow: 0 0 8px rgba(184,138,44,0.25);
    letter-spacing: 0.5px;
}


/* ============================
   SÖKFÄLT
============================ */

.search-section {
    position: relative;
}

.search-section input {
    max-width: 350px !important;
    background-color: #e6e6e6 !important;
    border: 1px solid #444 !important;
    border-radius: 30px;
    margin-top: 20px;
    padding-left: 45px;
    background-image: url('data:image/svg+xml;utf8,<svg fill="%23000000" width="22" height="22" xmlns="http://www.w3.org/2000/svg"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 109.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
    transition: box-shadow 0.2s ease;
}

/* Popup under sökfältet */
.search-results-box {
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    color: #1a1a1a;
    border: 2px solid #c89b3c;
    border-radius: 6px;
    padding: 10px;
    margin-top: 4px;
    width: 260px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.15);
    z-index: 999;
}

.search-results-box p {
    margin: 0;
    padding: 6px 0;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.search-results-box p:last-child {
    border-bottom: none;
}

.search-results-box p:hover {
    background: #f5f5f5;
}

.search-results-box button {
    margin-top: 8px;
    width: 100%;
}

/* ============================
   FORM & INPUTS
============================ */
input {
    width: 100%;
    padding: 8px 10px;   /* mindre höjd */
    margin-bottom: 14px;
    border-radius: 6px;
    border: 1px solid #444;
    background: #e6e6e6;
    color: #1a1a1a;
    font-size: 16px;
}


input::placeholder {
    color: #555;
}

input:focus {
    outline: 2px solid #c89b3c;
}

form button {
    width: 100%;
}

button {
    width: auto;
    padding: 12px;
    border-radius: 6px;
    border: none;
    background: #c89b3c;
    color: #1b1b1b;
    font-weight: bold;
    cursor: pointer;
}

button:hover {
    background: #e0b45a;
}

.input-group {
    max-width: 350px;
}

.two-column {
    display: flex;
    gap: 32px;
    margin-bottom: 20px;
    width: 100%;
}

.two-column .input-group {
    flex: 1;
    max-width: 350px;
}

.hidden {
    display: none !important;
}

/* ============================
   LIST-SEKTIONER
============================ */

.list-section h2 {
    margin-top: 30px;
    margin-bottom: 10px;
    color: #f7d08a;
}

.input-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 15px;
    color: #d9d9d9;
    font-weight: 500;
}

/* ============================
   KORT (STUGLOGG-STIL)
============================ */

.card {
    background: rgba(47, 47, 47, 0.95);
    padding: 18px;
    margin-bottom: 15px;
    border-left: 5px solid #c89b3c;
    border-radius: 10px;

    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.info-row {
    display: flex;
    justify-content: space-between;
    margin: 6px 0;
    padding-bottom: 4px;
    border-bottom: 1px solid #3a3a3a;
}

.label {
    font-weight: 600;
    color: #f7d08a;
}

.value a {
    color: #f2f2f2;
    text-decoration: none;
}

.value a:hover {
    color: #f7d08a;
}

/* ============================
   KNAPPAR I KORT
============================ */

.card-buttons {
    margin-top: 18px;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

.card-buttons button {
    width: auto;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    background: #c89b3c;
    color: #1b1b1b;
    transition: background 0.2s ease, transform 0.15s ease;
}

.card-buttons button:hover {
    background: #e0b45a;
    transform: translateY(-1px);
}

.card-buttons .delete {
    background: #b33a3a;
    color: white;
}

.card-buttons .delete:hover {
    background: #d14a4a;
}

/* ============================
   ARKIV
============================ */

.archive-header {
    cursor: pointer;
    user-select: none;
    margin-top: 30px;
    color: #f7d08a;
}

.archive-collapsed {
    display: none;
}

.archived-card {
    opacity: 0.85;
    border-left: 5px solid #777;
}

/* ============================
   MODAL
============================ */

.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.7);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: #2f2f2f;
    padding: 5px;
    border-radius: 6px;
    width: 90%;
    max-width: 780px;     /* större modal */
    max-height: 90vh;     /* aldrig utanför skärmen */
    overflow-y: auto;     /* scroll om för hög */
    border: 2px solid #c89b3c;
}

.modal-content h3 {
    margin-top: 0;
    margin-bottom: 10px;
}

#editForm .input-group {
    margin-bottom: 8px;
}

#editForm button {
    width: 100%;
}

#editForm .button-row {
    display: flex;
    flex-direction: column;
    padding: 0 4px 4px 4px;
    gap: 10px;
    margin-top: 10px;
}

#editForm input {
    max-width: 100%;
}

/* Snygg GULDBAKGRUND för sektionsrubrikerna */
#formToggle, #activeToggle, #archiveToggle {
    background-color:rgba(200, 155, 60, 0.8); /* Den guldiga-färgen */
    /*background-color: #c89b3c; /* Den solida guld-färgen */
    color: #1a1a1a;            /* Svart/Mörk text för hög kontrast */
    border: 1px solid #a67c2d;  /* Lite mörkare guld-ram */
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    display: block;
    margin-bottom: 12px;
    /* font-weight: bold;         /* Gör texten extra tydlig */
    text-align: left;
}

/* Hover-effekt: Gör den lite ljusare eller mörkare när man för musen över */
#formToggle:hover, #activeToggle:hover, #archiveToggle:hover {
    background-color: #d9ac4f; /* En aning ljusare guld */
    transform: translateY(-2px); /* Den "lyfter" litegrann */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3); /* Lägger till en liten skugga */
    cursor: pointer;
}

/* Klick-effekt: Den trycks ned lite */
#formToggle:active, #activeToggle:active, #archiveToggle:active {
    transform: translateY(0);
}

/* ============================
   IMPORT / EXPORT
============================ */

.import-export-section {
    background: rgba(47,47,47,0.95);
    padding: 20px;
    margin-top: 25px;
    border-radius: 10px;
    border-left: 5px solid #c89b3c;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
    width: 100%;
    box-sizing: border-box;
}

.import-export-section.hidden {
    display: none;
}

.button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.import-row {
    display: flex;
    align-items: center;   /* centrerar vertikalt */
    gap: 10px;
    margin-top: 15px;
}

/* Fil-input */
.import-row input[type="file"] {
    position: relative;
    top: 6px;
    width: 220px;
    height: 36px;          /* exakt höjd */
    padding: 6px 8px;
    font-size: 0.85rem;
    border-radius: 4px;
    background: #e6e6e6;
    border: 1px solid #444;
    box-sizing: border-box;
}

.import-row input[type="file"]:hover {
    background: #f0f0f0;
    border: 2px solid #e0b86a;
    box-shadow: 0 0 4px rgba(200,155,60,0.6);
}

.import-arrow {
    font-size: 1.3rem;
    color: #e0b86a;
    font-weight: bold;
    margin: 0 4px;
    position: relative;
    top: 2px;
    user-select: none;
}

/* Importera CSV-knappen */
#importBtn {
    height: 36px;
    padding: 0 14px;
    font-size: 0.85rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.import-message {
    margin-top: 10px;
    color: #f7d08a;
}

/* ============================
   ADD Artist BUTTON
============================ */
.add-btn {
    display: block;
    width: fit-content;
    margin: 20px 0 10px 0;
    padding: 12px 18px;
    border-radius: 30px;
    background: #c89b3c;
    color: #1b1b1b;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

/* ============================
   ADMIN BUTTON
============================ */
.admin-row {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.admin-btn {
    display: block;
    width: fit-content;
    margin: 40px 0 30px 0;
    padding: 12px 18px;
    border-radius: 30px;
    background: #c89b3c;
    color: #1b1b1b;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.admin-btn:hover {
    background: #e0b45a;
}

/* ============================
   CodaWorks – Månadskalender (Premium)
============================ */

.artist-calendar-section {
    margin-top: 40px;
    background: rgba(255,255,255,0.55);
    border-radius: 20px;
    padding: 25px;
    border: 1px solid rgba(184,138,44,0.45);
    box-shadow: 0 0 22px rgba(184,138,44,0.15);
    backdrop-filter: blur(12px);
}

/* Månad + pilar */
.calendar-header {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
    margin-bottom: 16px;
}

.month-label {
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.cal-btn {
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(184,138,44,0.45);
    padding: 6px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 18px;
    transition: 0.15s ease;
}

.cal-btn:hover {
    background: rgba(184,138,44,0.15);
    box-shadow: 0 0 12px rgba(184,138,44,0.35);
}

/* Veckodagar (7 kolumner) */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-left: 40px; /* matchar veckonummer-kolumnen */
    margin-bottom: 10px;
    font-weight: 600;
    color: #444;
}

.calendar-weekdays div {
    padding: 6px 0;
}

/* Veckonummer (egen rad, 8 kolumner) */
.calendar-weeknums {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    margin-bottom: 6px;
}

.weeknum-cell {
    font-size: 0.75rem;
    color: #777;
    padding-top: 6px;
    text-align: center;
}

/* Datumrutnät (8 kolumner: 1 för veckonummer + 7 dagar) */
.calendar-grid {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    gap: 6px;
}

/* Dagceller */
.calendar-day {
    padding: 12px 0;
    border-radius: 12px;
    background: rgba(255,255,255,0.85);
    text-align: center;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    border: 1px solid rgba(0,0,0,0.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.06);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.calendar-day:hover {
    transform: translateY(-2px);
    background: rgba(184,138,44,0.12);
    box-shadow: 0 0 14px rgba(184,138,44,0.25);
}

/* Idag */
.calendar-day.today {
    outline: 2px solid rgba(184,138,44,0.9);
    background: rgba(184,138,44,0.1);
}

/* Helger – rödare */
.calendar-day.weekend {
    background: rgba(255, 120, 120, 0.35);
    color: #7a0000;
}

.calendar-day.weekend:hover {
    background: rgba(255, 100, 100, 0.45);
}

/* Bokade datum – CodaWorks Guld */
.calendar-day.booked {
    background: radial-gradient(circle at top left, #c89b3c 0%, #8a6a2a 40%, #fff8e1 100%);
    border: 1px solid rgba(200,155,60,0.8);
    box-shadow: 0 0 12px rgba(200,155,60,0.45);
    color: #1a1a1a;
    font-weight: 600;
}

.calendar-day.booked:hover {
    background: radial-gradient(circle at top left, #e0b45a 0%, #a88332 40%, #fff3c4 100%);
}

/* Inaktiva dagar */
.calendar-day.inactive {
    opacity: 0.35;
    cursor: default;
    background: rgba(255,255,255,0.4);
}

.calendar-day.inactive:hover {
    transform: none;
    background: rgba(255,255,255,0.4);
    box-shadow: none;
}

/* ============================
   PRINT – Månadsrapport Deluxe
============================ */

.print-report {
    display: none;
    padding: 40px;
    font-family: Arial, sans-serif;
}

.print-report h1 {
    text-align: center;
    font-size: 32px;
    margin-bottom: 5px;
    color: #1a1a1a;
}

.print-report h2 {
    text-align: center;
    font-size: 22px;
    margin-bottom: 30px;
    color: #444;
}

.print-booking {
    padding: 12px 0;
    border-bottom: 1px solid #ccc;
}

.print-booking strong {
    color: #000;
}

/* PRINT MODE */
@media print {

    /* Dölj allt */
    body * {
        visibility: hidden !important;
    }

    /* Visa endast rapporten */
    #printReport, #printReport * {
        visibility: visible !important;
    }

    /* Placera rapporten överst */
    #printReport {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        padding: 40px !important;
        background: white !important;
        display: block !important;
    }

    /* Guldmarkering för bokade datum */ 
    .print-booking {
        background: #fff8e1;
        border-left: 4px solid #c89b3c;
        padding-left: 12px;
    } 
}

/* ============================
    FOOTER
============================ */

.site-footer {
    text-align: center;
    padding: 20px 10px;
    font-size: 0.9rem;
    color: #ffffff;
}
