/* booking-system/booking.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --text-main: #1e293b;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    
    --status-green: #22c55e;
    --status-green-bg: #dcfce7;
    --status-yellow: #eab308;
    --status-yellow-bg: #fef9c3;
    --status-red: #ef4444;
    --status-red-bg: #fee2e2;

    --radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1);
}

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

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
}

/* ====================
   Layout & Typography
   ==================== */
.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    font-weight: 600;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mb-4 { margin-bottom: 1rem; }
.hidden { display: none !important; }

/* ====================
   Buttons & Inputs
   ==================== */
.btn {
    display: inline-block;
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
}

.btn:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn:disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}
.btn-secondary:hover {
    background: var(--bg-color);
}

.form-group {
    margin-bottom: 1rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-muted);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* ====================
   Auth Modal/Card
   ==================== */
.auth-card {
    background: var(--card-bg);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    margin: 4rem auto;
}

.switch-form-text {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.switch-form-text a {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}
.switch-form-text a:hover {
    text-decoration: underline;
}

/* ====================
   Dashboard / Header
   ==================== */
.dashboard-header {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.user-info .credit-badge {
    background: var(--status-green-bg);
    color: var(--status-green);
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-left: 0.5rem;
}

.dashboard-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    overflow-x: auto;
}

.dashboard-tab {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-muted);
    cursor: pointer;
    flex: 0 0 auto;
    font-weight: 700;
    padding: 0.5rem 1rem;
}

.dashboard-tab.active {
    border-bottom-color: var(--primary);
    color: var(--text-main);
}

/* ====================
   Flight Cards
   ==================== */
.flight-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.flight-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    padding: 1.5rem;
    transition: transform 0.2s ease;
    border: 1px solid var(--border-color);
}
.flight-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.flight-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.flight-date {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.flight-location {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
}
.flight-location a {
    color: var(--primary);
    text-decoration: none;
}

/* ====================
   Blocks (Blokkok)
   ==================== */
.blocks-container {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.block-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #fdfdfd;
    cursor: pointer;
    transition: all 0.2s;
}

.block-item:hover {
    border-color: var(--primary);
}

.block-item input[type="checkbox"] {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
}

.block-info {
    flex: 1;
}

.block-info strong {
    display: block;
    font-size: 1rem;
}

.block-capacity {
    font-size: 0.875rem;
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    margin-top: 0.25rem;
    font-weight: 600;
}

/* Kapacitás színkódok (zöld, sárga, piros) */
.cap-green {
    background: var(--status-green-bg);
    color: var(--status-green);
}
.cap-yellow {
    background: var(--status-yellow-bg);
    color: var(--status-yellow);
}
.cap-red {
    background: var(--status-red-bg);
    color: var(--status-red);
}

/* ====================
   Rules Panel
   ==================== */
.rules-panel {
    background: #f1f5f9;
    padding: 1.5rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
}

.rules-panel h4 {
    margin-bottom: 0.5rem;
}

.rules-panel ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.rules-agree {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.rules-agree input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
}

.registration-rules-box {
    max-height: 260px;
    overflow: auto;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
}

.registration-rules-box p {
    margin-bottom: 0.85rem;
}

.registration-rules-box p:last-child {
    margin-bottom: 0;
}

.participation-choice-group {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.participation-choice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: #ffffff;
    cursor: pointer;
}

.participation-choice:focus-within,
.participation-choice:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.participation-choice input {
    width: 1rem;
    height: 1rem;
    margin-top: 0.2rem;
    accent-color: var(--primary);
    flex: 0 0 auto;
}

.participation-choice strong,
.participation-choice small {
    display: block;
}

.participation-choice small {
    margin-top: 0.25rem;
    color: var(--text-muted);
    line-height: 1.45;
}

.participation-info {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    padding: 1rem;
    font-size: 0.9rem;
    line-height: 1.55;
    margin-bottom: 1rem;
}

.participation-info p {
    margin-bottom: 0.75rem;
}

.participation-info p:last-child {
    margin-bottom: 0;
}

.required-documents {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.required-documents strong {
    display: block;
    margin-bottom: 0.5rem;
}

.required-documents ul {
    margin-left: 1.25rem;
}

.required-documents a,
.knowledge-item a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
}

.required-documents a:hover,
.knowledge-item a:hover {
    text-decoration: underline;
}

.registration-rules-agree {
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

/* ====================
   Tudaster
   ==================== */
.tasks-header,
.knowledge-header {
    margin-bottom: 1.5rem;
}

.tasks-header h2,
.knowledge-header h2 {
    margin-bottom: 0.25rem;
}

.tasks-list,
.knowledge-list {
    display: grid;
    gap: 1.5rem;
}

.task-card,
.knowledge-category {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 1.5rem;
}

.task-card h3,
.knowledge-category h3 {
    color: var(--text-main);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.task-card-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.task-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.task-meta {
    color: var(--primary);
    font-weight: 700;
}

.task-map {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    height: 360px;
    margin-bottom: 1rem;
    overflow: hidden;
    width: 100%;
}

.task-details {
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-main);
    display: grid;
    gap: 0.35rem;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    padding: 0.85rem;
}

.task-goals div {
    display: grid;
    gap: 0.15rem;
}

.task-goals span {
    color: var(--text-muted);
    font-size: 0.82rem;
}

.task-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.task-action {
    background: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 8px;
    color: #fff;
    font-weight: 700;
    padding: 0.65rem 0.9rem;
    text-decoration: none;
}

.task-action:hover {
    background: var(--primary-hover);
    text-decoration: none;
}

.task-action.secondary {
    background: #fff;
    color: var(--primary);
}

.task-action.secondary:hover {
    background: #eff6ff;
}

.knowledge-items {
    display: grid;
    gap: 0.75rem;
}

.knowledge-item {
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem;
}

.knowledge-item-title {
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.knowledge-item p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

.knowledge-action {
    flex: 0 0 auto;
    white-space: nowrap;
}

/* ====================
   Billing confirmation modal
   ==================== */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
}

.modal-content {
    background: #fff;
    border-radius: var(--radius);
    width: min(100%, 520px);
    max-height: calc(100vh - 2rem);
    overflow: auto;
    padding: 1.5rem;
    box-shadow: 0 20px 45px rgba(15, 23, 42, 0.25);
}

.billing-modal-content h2 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

.billing-modal-content p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.billing-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.billing-modal-actions .btn {
    width: auto;
}

@media (max-width: 640px) {
    .dashboard-header,
    .task-card-header,
    .knowledge-item {
        flex-direction: column;
    }

    .dashboard-header {
        align-items: stretch;
        gap: 1rem;
    }

    .dashboard-header .btn {
        width: 100% !important;
    }

    .knowledge-action {
        white-space: normal;
    }

    .task-map {
        height: 300px;
    }

    .task-actions {
        flex-direction: column;
    }

    .task-action {
        text-align: center;
        width: 100%;
    }

    .billing-modal-actions {
        flex-direction: column-reverse;
    }

    .billing-modal-actions .btn {
        width: 100%;
    }
}

/* Alert Boxes */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}
.alert-error {
    background: var(--status-red-bg);
    color: var(--status-red);
}
.alert-info {
    background: var(--status-yellow-bg);
    color: var(--text-main);
}
.alert-success {
    background: var(--status-green-bg);
    color: var(--status-green);
}
