/* DMB Frontend Styles */

.dmb-booking-section {
    margin-top: 32px;
    padding: 24px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 14px rgba(0,0,0,.07);
    font-family: inherit;
}

/* Header */
.dmb-header         { margin-bottom: 18px; }
.dmb-header__title  { margin: 0 0 6px; font-size: 20px; font-weight: 700; }
.dmb-header__sub    { margin: 0; color: #666; font-size: 14px; }

/* Month nav */
.dmb-month-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f0f7ff;
    border-radius: 6px;
    padding: 10px 16px;
    margin-bottom: 14px;
}
.dmb-nav-btn {
    width: 36px; height: 36px;
    font-size: 24px; line-height: 1;
    background: #2271b1; color: #fff;
    border: none; border-radius: 4px;
    cursor: pointer; transition: background .15s;
}
.dmb-nav-btn:hover  { background: #135e96; }
.dmb-month-title    { font-weight: 700; font-size: 18px; }

/* Calendar grid */
.dmb-weekdays,
.dmb-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}
.dmb-wd {
    text-align: center;
    font-weight: 600;
    font-size: 12px;
    padding: 8px 2px;
    background: #2271b1;
    color: #fff;
    border-radius: 3px;
}
.dmb-days { margin-top: 4px; }

/* Day cell */
.dmb-day {
    min-height: 72px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    padding: 6px;
    font-size: 12px;
    cursor: default;
    transition: border-color .15s, box-shadow .15s;
}
.dmb-day--empty         { background: #f5f5f5; border-color: transparent; }
.dmb-day--weekend       { background: #f9f9f9; }
.dmb-day--today .dmb-day-num { background: #2271b1; color: #fff; border-radius: 3px; }
.dmb-day--has-slots     { background: #eef5ff; cursor: pointer; }
.dmb-day--has-slots:hover { border-color: #2271b1; box-shadow: 0 2px 8px rgba(34,113,177,.15); }
.dmb-day--selected      { border-color: #2271b1 !important; box-shadow: 0 0 0 3px rgba(34,113,177,.2) !important; }
.dmb-day-num            { font-weight: 700; display: inline-block; padding: 2px 5px; }
.dmb-slot-badge         { display: inline-block; margin-top: 4px; font-size: 10px; background: #d4e6ff; color: #2271b1; border-radius: 3px; padding: 1px 5px; }

/* Spinner */
.dmb-loading        { grid-column: 1 / -1; text-align: center; padding: 30px; color: #888; font-size: 14px; }
.dmb-spinner {
    display: inline-block;
    width: 22px; height: 22px;
    border: 3px solid #e0e0e0;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: dmb-spin .8s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes dmb-spin { to { transform: rotate(360deg); } }

/* Slots panel */
.dmb-slots-panel {
    margin-top: 18px;
    padding: 18px;
    background: #f8f9fa;
    border: 1px solid #dde;
    border-radius: 6px;
}
.dmb-slots-panel__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.dmb-slots-panel__head h4 { margin: 0; font-size: 16px; }
.dmb-close-btn { background: none; border: none; font-size: 18px; color: #666; cursor: pointer; }
.dmb-close-btn:hover { color: #000; }
.dmb-slots-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px; }

/* Slot card */
.dmb-slot-card { background: #fff; border: 2px solid #dde; border-radius: 6px; padding: 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.dmb-slot-card:hover      { border-color: #2271b1; box-shadow: 0 2px 8px rgba(34,113,177,.12); }
.dmb-slot-card--selected  { border-color: #2271b1; background: #eef5ff; }
.dmb-slot-time            { font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.dmb-slot-spots           { font-size: 11px; color: #00a32a; }
.dmb-slot-spots--low      { color: #c9760e; }

/* Booking form */
.dmb-form-wrap      { margin-top: 18px; padding: 20px; border: 1px solid #dde; border-radius: 6px; }
.dmb-form-wrap h4   { margin: 0 0 16px; font-size: 17px; }
.dmb-summary        { background: #f8f9fa; padding: 12px 14px; border-radius: 4px; margin-bottom: 18px; }
.dmb-summary__row   { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.dmb-field          { margin-bottom: 14px; }
.dmb-field label    { display: block; font-weight: 600; margin-bottom: 5px; font-size: 14px; }
.dmb-field input[type="number"],
.dmb-field textarea {
    width: 100%;
    padding: 9px 11px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
    font-family: inherit;
}
.dmb-field input:focus,
.dmb-field textarea:focus { border-color: #2271b1; outline: none; box-shadow: 0 0 0 2px rgba(34,113,177,.1); }
.dmb-form-actions   { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; }
.dmb-btn            { padding: 11px 24px; border: none; border-radius: 4px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .15s; }
.dmb-btn--primary         { background: #2271b1; color: #fff; }
.dmb-btn--primary:hover   { background: #135e96; }
.dmb-btn--secondary       { background: #f0f0f1; color: #1e1e1e; }
.dmb-btn--secondary:hover { background: #ddd; }
.dmb-btn:disabled         { opacity: .6; cursor: not-allowed; }
.dmb-msg            { margin-top: 14px; padding: 11px 14px; border-radius: 4px; font-size: 14px; display: none; }
.dmb-msg--ok        { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.dmb-msg--err       { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Responsive */
@media (max-width: 640px) {
    .dmb-wd         { font-size: 10px; padding: 6px 0; }
    .dmb-day        { min-height: 54px; padding: 4px; }
    .dmb-slot-badge { display: none; }
    .dmb-slots-grid { grid-template-columns: 1fr 1fr; }
    .dmb-month-nav  { padding: 8px 10px; }
}
