/* =====================================================
   Veranstaltungskalender – Frontend Styles
   ===================================================== */

.vk-kalender-wrap {
    font-family: inherit;
    max-width: 100%;
}

.vk-divi-module-preview {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 18px;
    border: 1px solid #d8dbe2;
    border-radius: 6px;
    background: #fff;
    color: #333;
}

.vk-divi-module-preview span {
    color: #666;
    font-size: 13px;
}

/* ----- Toolbar ----- */
.vk-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}

.vk-view-toggle {
    display: flex;
    border: 1px solid #ddd;
    border-radius: 6px;
    overflow: hidden;
}

.vk-btn-view {
    background: #fff;
    border: none;
    padding: 8px 18px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
    transition: background 0.2s, color 0.2s;
}

.vk-btn-view.active,
.vk-btn-view:hover {
    background: #051639;
    color: #fff;
}

.vk-toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.vk-ical-feed-btn {
    white-space: nowrap;
    font-size: 13px;
}

.vk-filter-wrap select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
}

/* ----- Calendar ----- */
.vk-calendar {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.vk-cal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: #051639;
    color: #fff;
}

.vk-month-title {
    font-size: 18px;
    font-weight: 600;
}

.vk-nav-btn {
    background: transparent;
    border: 2px solid rgba(255,255,255,0.5);
    color: #fff;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: background 0.2s;
}

.vk-nav-btn:hover {
    background: rgba(255,255,255,0.2);
}

.vk-cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.vk-cal-day-name {
    text-align: center;
    padding: 10px 4px;
    font-weight: 600;
    font-size: 12px;
    color: #666;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.vk-cal-day {
    min-height: 80px;
    padding: 6px;
    border-right: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: top;
    position: relative;
}

.vk-cal-day:nth-child(7n) { border-right: none; }
.vk-cal-day.vk-empty { background: #fafafa; }

.vk-cal-day.vk-today .vk-day-num {
    background: #051639;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    font-size: 12px;
}

.vk-day-num {
    display: block;
    font-size: 12px;
    color: #333;
    margin-bottom: 4px;
}

.vk-event-dot {
    display: block;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 3px;
    margin-bottom: 2px;
    text-decoration: none;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.vk-event-dot span {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.vk-vis-oeffentlich { background: #d4edda; color: #155724; }
.vk-vis-intern      { background: #cce5ff; color: #004085; }

.vk-legend {
    padding: 10px 16px;
    display: flex;
    gap: 16px;
    border-top: 1px solid #e0e0e0;
    background: #f8f9fa;
}

.vk-legend-item {
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 3px;
}

/* ----- List View ----- */
.vk-list { }

.vk-list-month {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    border-bottom: 2px solid #051639;
    padding-bottom: 6px;
    margin: 24px 0 12px;
}

.vk-list-month-events {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vk-event-card {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    border-left: 4px solid #051639;
    transition: box-shadow 0.2s;
}

.vk-event-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

.vk-event-card.vk-vis-intern {
    border-left-color: #1a6fc4;
}

.vk-event-card.vk-vis-oeffentlich {
    border-left-color: #28a745;
}

.vk-event-date-block {
    background: #f8f9fa;
    padding: 16px;
    min-width: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-right: 1px solid #e0e0e0;
}

.vk-event-day {
    font-size: 28px;
    font-weight: 700;
    color: #051639;
    line-height: 1;
}

.vk-event-month {
    font-size: 11px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vk-event-body {
    padding: 14px 16px;
    flex: 1;
}

.vk-event-meta-top {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 6px;
}

.vk-badge {
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.vk-badge-oeffentlich { background: #d4edda; color: #155724; }
.vk-badge-intern      { background: #cce5ff; color: #004085; }
.vk-badge-cat         { background: #fff3cd; color: #856404; }

.vk-event-title {
    margin: 0 0 8px;
    font-size: 16px;
}

.vk-event-title a {
    color: #333;
    text-decoration: none;
}

.vk-event-title a:hover { color: #051639; }

.vk-event-info {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.vk-info-item {
    font-size: 13px;
    color: #666;
}

.vk-event-excerpt {
    font-size: 13px;
    color: #777;
    margin: 6px 0 10px;
    line-height: 1.5;
}

.vk-event-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

/* ----- Buttons ----- */
.vk-btn {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
    font-family: inherit;
    line-height: 1.4;
}

.vk-btn:active { transform: scale(0.98); }

.vk-btn-primary {
    background: #051639;
    color: #fff;
}
.vk-btn-primary:hover { background: #0a2a5e; color: #fff; }

.vk-btn-register {
    background: #28a745;
    color: #fff;
}
.vk-btn-register:hover { background: #218838; color: #fff; }

.vk-btn-ical {
    background: #fff;
    color: #555;
    border: 1px solid #ddd;
}
.vk-btn-ical:hover { background: #f8f9fa; color: #333; }

.vk-btn-details {
    background: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}
.vk-btn-details:hover { background: #e9ecef; }

.vk-btn-disabled {
    background: #e9ecef;
    color: #999;
    cursor: default;
    padding: 7px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: inline-block;
}

.vk-no-events {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* ----- Single Event: Bild & Text ----- */
.vk-single-image {
    margin-bottom: 24px;
    border-radius: 10px;
    overflow: hidden;
    line-height: 0;
}

.vk-featured-image {
    width: 100%;
    height: auto;
    max-height: 460px;
    object-fit: cover;
    display: block;
}

.vk-single-content {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e0e0e0;
    font-size: 16px;
    line-height: 1.7;
    color: #333;
}

.vk-single-content p { margin-bottom: 16px; }
.vk-single-content h2,
.vk-single-content h3,
.vk-single-content h4 { margin: 24px 0 10px; }
.vk-single-content ul,
.vk-single-content ol { padding-left: 24px; margin-bottom: 16px; }
.vk-single-content img { max-width: 100%; height: auto; border-radius: 6px; }

/* ----- Single Event ----- */
.vk-single-event {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.vk-single-meta {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.vk-single-meta-item {
    font-size: 15px;
    color: #444;
}

.vk-single-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 16px;
    margin-top: 12px;
}

.vk-qrcode-wrap {
    text-align: center;
}

.vk-qrcode-wrap p {
    margin: 0 0 6px;
    font-size: 13px;
}

.vk-qrcode-wrap small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 11px;
}

.vk-registration-status {
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.vk-status-full   { background: #f8d7da; color: #721c24; }
.vk-status-closed { background: #fff3cd; color: #856404; }

.vk-deadline {
    font-size: 12px;
    color: #888;
    margin: 4px 0 0;
}

/* ----- Modal ----- */
.vk-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.vk-modal {
    background: #fff;
    border-radius: 12px;
    padding: 28px 32px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.vk-modal h3 {
    margin: 0 0 8px;
    font-size: 20px;
}

.vk-details-modal {
    max-width: 760px;
}

.vk-modal-loading {
    color: #666;
    padding: 24px 0;
    text-align: center;
}

.vk-details-image {
    margin: -4px 0 20px;
    border-radius: 8px;
    overflow: hidden;
    line-height: 0;
}

.vk-details-title {
    margin: 0 34px 12px 0;
    font-size: 24px;
    line-height: 1.25;
    color: #222;
}

.vk-details-meta {
    margin: 14px 0 18px;
}

.vk-details-content {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #eee;
    color: #333;
    line-height: 1.7;
}

.vk-details-content p {
    margin: 0 0 14px;
}

.vk-details-content img {
    max-width: 100%;
    height: auto;
}

.vk-details-actions {
    padding-top: 18px;
    border-top: 1px solid #eee;
}

.vk-modal-event-title {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #eee;
}

.vk-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    background: transparent;
    border: none;
    font-size: 22px;
    cursor: pointer;
    color: #999;
    line-height: 1;
    padding: 4px 8px;
}
.vk-modal-close:hover { color: #333; }

.vk-form-row {
    margin-bottom: 14px;
}

.vk-form-row label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 5px;
    color: #444;
}

.vk-form-row input,
.vk-form-row textarea {
    width: 100%;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.vk-form-row input:focus,
.vk-form-row textarea:focus {
    outline: none;
    border-color: #051639;
    box-shadow: 0 0 0 3px rgba(5,22,57,0.15);
}

.vk-form-submit {
    margin-top: 16px;
    text-align: right;
}

.vk-form-message {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    margin-top: 10px;
    display: none;
}

.vk-form-message.success {
    background: #d4edda;
    color: #155724;
    display: block;
}

.vk-form-message.error {
    background: #f8d7da;
    color: #721c24;
    display: block;
}

/* ----- Responsive ----- */
@media (max-width: 600px) {
    .vk-event-card { flex-direction: column; }
    .vk-event-date-block { flex-direction: row; gap: 8px; padding: 10px 16px; min-width: auto; border-right: none; border-bottom: 1px solid #e0e0e0; }
    .vk-cal-day { min-height: 50px; padding: 4px; }
    .vk-event-dot span { display: none; }
    .vk-event-dot { width: 8px; height: 8px; padding: 0; border-radius: 50%; }
    .vk-toolbar { flex-direction: column; align-items: flex-start; }
    .vk-single-actions { flex-direction: column; }
    .vk-modal { padding: 20px 16px; }
}
