.kr-reservation {
    max-width: 1200px;
    margin: 0 auto;
    font-family: inherit;
    font-size: 13px;
}

/* Info bar */
.kr-info {
    background: #e8f4fc;
    border: 1px solid #b3d9f2;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 16px;
    font-size: 13px;
}

/* Two-column layout */
.kr-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 20px;
    align-items: start;
}

/* Calendar column */
.kr-col-calendar {
    min-width: 0;
}

.kr-calendar-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kr-calendar-mobile-nav {
    display: none;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.kr-nav-btn {
    background: #007fc5;
    color: #fff;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.4;
}

.kr-nav-btn:hover {
    background: #005e94;
}

.kr-current-week,
.kr-current-day {
    font-weight: 600;
    font-size: 14px;
    color: #000;
}

/* Calendar Grid */
.kr-calendar {
    display: grid;
    grid-template-columns: 44px repeat(7, 1fr);
    gap: 1px;
    background: #ccc;
    border: 1px solid #ccc;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
}

.kr-calendar-header {
    background: #007fc5;
    color: #fff;
    padding: 6px 2px;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.3;
}

.kr-calendar-header.kr-time-header {
    font-size: 10px;
}

.kr-calendar-header .kr-header-date {
    display: block;
    font-weight: 400;
    font-size: 10px;
    opacity: 0.85;
}

.kr-time-label {
    background: #f5f5f5;
    padding: 0 2px;
    text-align: center;
    font-size: 10px;
    font-weight: 500;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kr-slot {
    background: #e8f4fc;
    cursor: pointer;
    transition: background 0.15s;
    min-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
}

.kr-slot:hover:not(.kr-slot-booked):not(.kr-slot-blocked):not(.kr-slot-past) {
    background: #b3d9f2;
}

.kr-slot-booked {
    background: #ffcdd2;
    cursor: not-allowed;
    color: #b71c1c;
}

.kr-slot-blocked {
    background: #e0e0e0;
    cursor: not-allowed;
    color: #757575;
}

.kr-slot-selected {
    background: #f6cb1c !important;
    color: #000;
}

.kr-slot-past {
    background: #f5f5f5;
    cursor: not-allowed;
    color: #ccc;
}

/* Legend */
.kr-legend {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 11px;
}

.kr-legend-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.kr-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 2px;
    display: inline-block;
}

.kr-legend-color.kr-free { background: #e8f4fc; border: 1px solid #b3d9f2; }
.kr-legend-color.kr-booked { background: #ffcdd2; border: 1px solid #ef9a9a; }
.kr-legend-color.kr-blocked { background: #e0e0e0; border: 1px solid #bdbdbd; }
.kr-legend-color.kr-selected { background: #f6cb1c; }

/* Form column */
.kr-col-form {
    position: sticky;
    top: 20px;
}

/* Type toggle */
.kr-type-toggle {
    display: inline-flex;
    gap: 0;
    margin-bottom: 16px;
    border-radius: 6px;
    overflow: hidden;
    border: 2px solid #007fc5;
}

.kr-type-btn {
    padding: 10px 20px;
    border: none;
    background: #fff;
    color: #007fc5;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    font-family: inherit;
    white-space: nowrap;
}

.kr-type-btn.kr-type-active {
    background: #007fc5;
    color: #fff;
}

.kr-selection-info {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 10px 14px;
    margin-bottom: 12px;
    text-align: center;
}

.kr-selection-info p {
    margin: 0;
}

.kr-select-hint {
    color: #888;
    font-style: italic;
}

.kr-select-detail {
    color: #007fc5;
    font-weight: 500;
}

/* Form */
.kr-form {
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 14px;
}

.kr-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 6px;
}

.kr-form-field {
    flex: 1;
}

.kr-field-small {
    flex: 0 0 80px;
}

.kr-form-field label {
    display: block;
    margin-bottom: 2px;
    font-weight: 500;
    font-size: 11px;
    color: #555;
}

.kr-form-field input,
.kr-form-field textarea {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1.3;
    height: auto;
    min-height: 0;
    font-family: inherit;
    box-sizing: border-box;
    color: #000;
}

.kr-form-field input:focus,
.kr-form-field textarea:focus {
    border-color: #007fc5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 127, 197, 0.15);
}

.kr-form-field input.kr-invalid {
    border-color: #d32f2f;
}

.kr-submit-btn {
    background: #007fc5;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    width: 100%;
    margin-top: 4px;
    transition: background 0.2s;
}

.kr-submit-btn:hover:not(:disabled) {
    background: #005e94;
}

.kr-submit-btn:disabled {
    background: #999;
    cursor: not-allowed;
}

.kr-form-message {
    margin-top: 8px;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 12px;
}

.kr-form-message.kr-success {
    background: #e8f4fc;
    color: #005e94;
    border: 1px solid #b3d9f2;
    white-space: pre-line;
    text-align: left;
}

.kr-form-message.kr-error {
    background: #ffebee;
    color: #c62828;
    border: 1px solid #ef9a9a;
}

/* Disabled notice */
.kr-disabled-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 20px 24px;
    text-align: center;
    font-size: 14px;
    color: #856404;
}

.kr-disabled-notice p {
    margin: 8px 0;
}

.kr-disabled-notice a {
    color: #007fc5;
}

/* Loading */
.kr-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.kr-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #e0e0e0;
    border-top-color: #007fc5;
    border-radius: 50%;
    animation: kr-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes kr-spin {
    to { transform: rotate(360deg); }
}

/* Mobile */
@media (max-width: 900px) {
    .kr-layout {
        grid-template-columns: 1fr;
    }

    .kr-col-form {
        position: static;
    }
}

@media (max-width: 600px) {
    .kr-calendar-nav {
        display: none;
    }

    .kr-calendar-mobile-nav {
        display: flex;
    }

    .kr-calendar {
        grid-template-columns: 44px 1fr;
    }

    .kr-calendar-header.kr-day-header:not(.kr-day-active) {
        display: none;
    }

    .kr-slot:not(.kr-slot-day-active) {
        display: none;
    }

    .kr-form-row {
        flex-direction: column;
        gap: 8px;
    }

    .kr-field-small {
        flex: 1;
    }
}
