/* ─────────────────────────────────────────────
   Stökustaður – Bókunarkerfi
   ───────────────────────────────────────────── */

body {
    font-size: 18px;
    background-color: #f0f2f5;
    margin: 0;
}

/* ── ÞÉTTUR HAUS ──────────────────────────────*/
.stokustadur-header {
    background: linear-gradient(135deg, #1a237e 0%, #283593 100%);
    color: white;
    padding: 0.9rem 1.5rem;
}

.header-top-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.stokustadur-title h1 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0;
    letter-spacing: -0.5px;
}

/* Innskráður notandi í haus */
.current-user-badge {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.5rem 1.1rem;
    border-radius: 30px;
    font-weight: 700;
}

.user-badge-name {
    font-size: 1.2rem;
    color: white;
}

.user-badge-logout {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.5);
    padding: 2px 8px;
    border-radius: 12px;
}

.user-badge-logout:hover {
    background: rgba(255,255,255,0.2);
    color: white;
}

.btn-login-header {
    padding: 0.6rem 1.3rem;
    font-size: 1.1rem;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.6);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-login-header:hover {
    background: rgba(255,255,255,0.3);
}

/* ── SÍUR OG SKÝRING Á EINNI LÍNU ────────────*/
.header-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    row-gap: 0.4rem;
}

.house-filter-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.filter-label {
    font-size: 1rem;
    font-weight: 600;
    opacity: 0.85;
}

.house-btn {
    padding: 0.4rem 1rem;
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid rgba(255,255,255,0.5);
    border-radius: 20px;
    background: rgba(255,255,255,0.12);
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.house-btn:hover {
    background: rgba(255,255,255,0.25);
    border-color: white;
}

.house-btn.active {
    background: white;
    color: #1a237e;
    border-color: white;
}

.legend-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.legend-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 16px;
    color: white;
    font-size: 0.95rem;
    font-weight: 700;
}

.legend-sep {
    opacity: 0.4;
    font-size: 1.2rem;
}

.legend-house {
    padding: 0.3rem 0.7rem;
    background: rgba(255,255,255,0.12);
    border-radius: 5px;
    font-size: 0.95rem;
    font-weight: 600;
}

/* ── DAGATAL ──────────────────────────────────*/
.calendar-container {
    max-width: 1400px;
    margin: 1.2rem auto;
    padding: 0 1rem 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.fc {
    font-size: 1.05rem;
}

.fc-toolbar-title {
    font-size: 1.8rem !important;
    font-weight: 800 !important;
    color: #1a237e;
}

.fc-button {
    font-size: 1.05rem !important;
    padding: 0.45rem 1.1rem !important;
    font-weight: 700 !important;
    border-radius: 8px !important;
}

.fc-button-primary {
    background-color: #1a237e !important;
    border-color: #1a237e !important;
}

.fc-button-primary:hover {
    background-color: #283593 !important;
}

.fc-col-header-cell {
    background: #e8eaf6;
    font-size: 1.05rem;
    font-weight: 800;
    padding: 0.5rem 0 !important;
    color: #1a237e;
}

.fc-daygrid-day {
    min-height: 90px !important;
    cursor: pointer;
}

.fc-daygrid-day:hover {
    background: #f3f4ff !important;
}

.fc-daygrid-day-number {
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    color: #333;
    padding: 5px 8px !important;
}

.fc-day-today {
    background: #f0f4ff !important;
}

.fc-day-today .fc-daygrid-day-number {
    background: #1a237e;
    color: white !important;
    border-radius: 50%;
    width: 34px;
    height: 34px;
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.fc-event {
    border-radius: 6px !important;
    padding: 2px 4px !important;
    margin: 2px 2px !important;
    cursor: pointer !important;
}

.fc-event:hover {
    opacity: 0.85;
}

.fc-event-main-inner {
    padding: 2px 4px;
}

.fc-event-name {
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.2;
}

.fc-event-house {
    font-size: 0.78rem;
    font-weight: 600;
    opacity: 0.9;
}

/* ── FLOATING BÓKA TAKKI (FAB) ────────────────*/
.fab-boka {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    padding: 1rem 2rem;
    font-size: 1.2rem;
    font-weight: 800;
    background: #43A047;
    color: white;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
    transition: all 0.2s;
    z-index: 1000;
}

.fab-boka:hover {
    background: #2E7D32;
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.35);
}

/* ── MODAL ────────────────────────────────────*/
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-box {
    background: white;
    border-radius: 16px;
    padding: 2.2rem;
    max-width: 520px;
    width: 100%;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.2rem;
    background: none;
    border: none;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    color: #666;
    padding: 0;
}

.modal-close:hover { color: #c00; }

.modal-title {
    font-size: 1.7rem;
    font-weight: 800;
    margin: 0 0 1.3rem 0;
    color: #1a237e;
}

.modal-error {
    background: #ffebee;
    color: #c62828;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    border-left: 5px solid #c62828;
}

.modal-warning {
    background: #fff8e1;
    color: #e65100;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    margin-bottom: 1.1rem;
    font-size: 1rem;
    font-weight: 600;
    border-left: 5px solid #ff8f00;
}

.esc-hint {
    text-align: center;
    color: #999;
    font-size: 0.85rem;
    margin: 1rem 0 0;
}

/* ── FORM ─────────────────────────────────────*/
.form-group-big {
    margin-bottom: 1.3rem;
}

.form-group-big label {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.4rem;
}

.input-big {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1.15rem;
    border: 2px solid #bbb;
    border-radius: 10px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.input-big:focus {
    border-color: #1a237e;
    outline: none;
    box-shadow: 0 0 0 3px rgba(26,35,126,0.12);
}

.hint-text {
    display: block;
    color: #666;
    font-size: 0.92rem;
    margin-top: 0.35rem;
}

.house-checkboxes {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.house-checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    cursor: pointer;
}

.house-checkbox {
    width: 22px;
    height: 22px;
    cursor: pointer;
    flex-shrink: 0;
}

.house-checkbox-text {
    font-size: 1.15rem;
    font-weight: 700;
    padding: 0.35rem 0.8rem;
    background: #f5f5f5;
    border-radius: 6px;
}

.btn-submit {
    width: 100%;
    padding: 0.95rem;
    font-size: 1.2rem;
    font-weight: 800;
    background: #1a237e;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    margin-top: 0.3rem;
    transition: background 0.2s;
}

.btn-submit:hover { background: #283593; }

/* ── EVENT MODAL ──────────────────────────────*/
.event-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

.event-detail-row {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: #f5f5f5;
    padding: 0.75rem 1rem;
    border-radius: 8px;
}

.event-detail-icon { font-size: 1.3rem; flex-shrink: 0; }

.event-detail-value {
    font-size: 1.15rem;
    font-weight: 600;
    color: #222;
}

.cancel-hint {
    font-size: 1rem;
    color: #666;
    margin-bottom: 0.8rem;
}

.btn-cancel-booking {
    width: 100%;
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: 800;
    background: #c62828;
    color: white;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-cancel-booking:hover { background: #b71c1c; }

/* ── NAVBAR ───────────────────────────────────*/
.nav-user-badge {
    border-radius: 20px;
    margin: 4px 8px;
}

/* ── FARSÍMAR ─────────────────────────────────*/
@media (max-width: 768px) {
    body { font-size: 16px; }

    /* Þéttur haus */
    .stokustadur-header { padding: 0.7rem 0.9rem; }
    .stokustadur-title h1 { font-size: 1.4rem; }
    .header-top-row { margin-bottom: 0.5rem; }

    /* Fela skýringu og síumiða — of löng á síma */
    .legend-bar { display: none !important; }
    .filter-label { display: none !important; }

    /* Síur á einni línu */
    .header-controls-row { flex-direction: row; align-items: center; flex-wrap: nowrap; }
    .house-filter-bar { flex-wrap: nowrap !important; gap: 0.35rem; overflow-x: auto; }
    .house-btn {
        padding: 0.35rem 0.65rem;
        font-size: 0.85rem;
        white-space: nowrap;
        flex-shrink: 0;
    }

    /* Innskráður notandi — minnka */
    .current-user-badge { padding: 0.4rem 0.8rem; gap: 0.5rem; }
    .user-badge-name { font-size: 1rem; }
    .btn-login-header { padding: 0.45rem 0.9rem; font-size: 0.95rem; }

    /* Dagatal */
    .calendar-container { margin: 0.6rem 0.4rem; padding: 0 0.4rem 1rem; }
    .fc-toolbar-title { font-size: 1.2rem !important; }
    .fc-toolbar { flex-wrap: nowrap !important; gap: 0.3rem !important; }
    .fc-button { font-size: 0.95rem !important; padding: 0.4rem 0.8rem !important; }
    .fc-col-header-cell { font-size: 0.9rem; padding: 0.4rem 0 !important; }
    .fc-daygrid-day { min-height: 60px !important; }
    .fc-daygrid-day-number { font-size: 1rem !important; padding: 3px 5px !important; }
    .fc-event-name { font-size: 0.85rem; }
    .fc-event-house { font-size: 0.72rem; }

    /* FAB */
    .fab-boka {
        bottom: 1rem;
        right: 1rem;
        font-size: 1rem;
        padding: 0.75rem 1.4rem;
    }

    /* Modal */
    .modal-box { padding: 1.4rem; }
    .modal-title { font-size: 1.4rem; }
    .input-big { font-size: 1.05rem; padding: 0.7rem 0.8rem; }
    .btn-submit { font-size: 1.1rem; }
}
