/* ===================================
   ADDITIONAL APP STYLES
   Unified styles for components
=================================== */

/* === Footer === */
.app-footer {
    text-align: center;
    padding: 20px;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: auto;
}

/* === Page Layout === */
.page-body {
    display: block;
    padding: 40px;
}

.page-body--light {
    background: #f0f4f8;
}

.container-centered {
    margin: 0 auto;
}

.container-narrow {
    max-width: 1200px;
}

.container-wide {
    max-width: 1200px;
}

/* === Alerts === */
.alert {
    padding: 15px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
}

.alert-error {
    background: #fee2e2;
    color: #b91c1c;
}

/* === Back Navigation Button === */
.back-btn {
    border-radius: 12px;
    width: auto;
    padding: 0 15px;
    text-decoration: none;
}

/* === Cards/Panels === */
.card {
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.card-bordered {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
}

.card-section {
    margin-bottom: 40px;
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* === Section Headers === */
.section-title {
    margin-bottom: 20px;
    color: var(--text-color);
}

.section-subtitle {
    margin-bottom: 15px;
    font-size: 1rem;
    color: #64748b;
}

/* === Form Utilities === */
.form-row--align-end {
    align-items: flex-end;
}

.form-group--inline {
    margin-bottom: 0;
}

.form-group--flex {
    display: flex;
    align-items: flex-end;
    gap: 5px;
}

.form-group--color {
    width: 150px;
}

/* === Input Styles === */
.input-date {
    padding: 8px;
    width: 140px;
}

.input-inline {
    border: 1px solid #e2e8f0;
    padding: 8px 12px;
    border-radius: 8px;
    flex: 1;
    outline: none;
    background: white;
}

.select-filter {
    padding: 8px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    width: 150px;
}

.multi-select {
    position: relative;
    min-width: 160px;
}

.multi-select-trigger {
    width: 100%;
    padding: 8px 12px;
    border-radius: 12px;
    border: 2px solid #e2e8f0;
    background: white;
    text-align: left;
    font-size: 0.9rem;
    cursor: pointer;
}

.multi-select.open .multi-select-trigger {
    border-color: var(--primary-color);
}

.multi-select-menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    padding: 8px;
    display: none;
    z-index: 40;
    max-height: 220px;
    overflow-y: auto;
}

.multi-select.open .multi-select-menu {
    display: block;
}

.multi-select-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 4px;
    font-size: 0.9rem;
    color: #1f2937;
    cursor: pointer;
}

.multi-select-option input {
    margin: 0;
}

.select-modal {
    width: 100%;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
}

/* === Labels === */
.label-small {
    font-size: 0.8rem;
    margin-bottom: 2px;
    display: block;
}

/* === Buttons === */
.btn-ml {
    margin-left: 10px;
}

.btn-clear {
    background: #e2e8f0;
    color: #64748b;
    padding: 8px 12px;
}

.btn-icon {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-preview {
    text-decoration: none;
    margin-right: 5px;
    background: #e0e7ff;
    color: #4338ca;
}

.btn-delete-inline {
    background: #fee2e2;
    color: #ef4444;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 0.9rem;
}

.btn-save-small {
    padding: 6px 12px;
    font-size: 0.8rem;
}

.delete-btn-lg {
    color: #ef4444;
    font-size: 1.5rem;
    line-height: 1;
}

/* === Agenda === */
.agenda-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.agenda-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.agenda-export-group {
    display: flex;
    gap: 5px;
    margin-left: auto;
}

.agenda-list {
    max-height: none;
    flex: 1;
}

/* === Modal Sections === */
.modal-section {
    margin-top: 20px;
    border-top: 1px solid #e2e8f0;
    padding-top: 15px;
}

/* === Event Type Item === */
.event-type-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 10px;
}

details.event-type-item {
    display: block;
    padding: 0;
}

.schedule-accordion {
    border: 1px solid #e2e8f0;
    background: #fff;
}

.schedule-accordion--primary {
    border-color: #6366f1;
    box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.25);
}

.schedule-accordion--primary > summary {
    background: #eef2ff;
}

.schedule-accordion--primary .schedule-accordion-title::after {
    content: 'Primary';
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 8px;
    padding: 2px 6px;
    border-radius: 999px;
    background: #6366f1;
    color: #fff;
}

.schedule-accordion > summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 12px;
    cursor: pointer;
}

.schedule-accordion[open] > summary {
    background: #eef2ff;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.schedule-accordion > summary::-webkit-details-marker {
    display: none;
}

.schedule-accordion .schedule-accordion-title {
    font-weight: 600;
    color: #0f172a;
}

.schedule-accordion > *:not(summary) {
    padding: 16px;
}

.event-type-form {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.event-type-delete {
    margin-left: 10px;
}

/* === Tables === */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table--small {
    font-size: 0.9rem;
}

.data-table thead tr {
    background: #f8fafc;
    text-align: left;
}

.data-table th {
    padding: 15px;
    font-weight: 600;
    color: #64748b;
}

.data-table th--actions {
    text-align: right;
}

.data-table tbody tr {
    border-top: 1px solid #f1f5f9;
}

.data-table td {
    padding: 15px;
}

.data-table td--actions {
    text-align: right;
}

.data-table td--empty {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
}

/* Preview Table */
.preview-table th {
    padding: 10px;
    font-weight: 600;
    color: #64748b;
    border-bottom: 1px solid #e2e8f0;
}

.preview-table tbody tr {
    border-bottom: 1px solid #f1f5f9;
}

.preview-table td {
    padding: 10px;
    color: #334155;
}

/* === Table Card Header === */
.table-card-header {
    font-size: 1.2rem;
    color: #1e293b;
    margin-bottom: 15px;
    border-bottom: 2px solid #f1f5f9;
    padding-bottom: 10px;
}

.table-card-header span {
    color: #6366f1;
}

/* === Misc Utilities === */
.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-30 {
    margin-top: 30px;
}

.overflow-x-auto {
    overflow-x: auto;
}

.text-muted {
    color: #94a3b8;
}

.text-italic {
    font-style: italic;
}

.text-small {
    font-size: 0.8rem;
}

.inline-form {
    display: inline;
}

.flex-1 {
    flex: 1;
}

.th--actions {
    text-align: right;
}

.td--actions {
    text-align: right;
}

.td--empty {
    padding: 30px;
    text-align: center;
    color: #94a3b8;
}
