/* 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; }
}


/* ============================================================
   DMB MISSING PET FLYER — Modal + Generated Flyer Styles
   ============================================================ */

/* ── Flyer Button (sits beside Add Pet) ── */
.dmb-btn-flyer {
    background: #1a1a1a;
    color: #f5c518;
    border: 2px solid #f5c518;
}
.dmb-btn-flyer:hover {
    background: #f5c518;
    color: #1a1a1a;
    filter: none;
}

/* ── Flyer Modal Form Body ── */
.dmb-flyer-form-body {
    padding: 24px;
    box-sizing: border-box;
}
.dmb-flyer-intro {
    background: #fffbea;
    border: 1.5px solid #f5c518;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: .84rem;
    color: #5a4200;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: -apple-system, sans-serif;
}
.dmb-flyer-intro i { font-size: 1.2rem; color: #c8a000; flex-shrink: 0; }

.dmb-flyer-section-title {
    font-size: .68rem;
    font-weight: 700;
    color: #8a7060;
    text-transform: uppercase;
    letter-spacing: .7px;
    font-family: -apple-system, sans-serif;
    margin: 18px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8ddd4;
}
.dmb-flyer-section-title:first-child { margin-top: 0; }

/* ── Flyer Form Grid ── */
.dmb-flyer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 520px) {
    .dmb-flyer-grid { grid-template-columns: 1fr; }
}
.dmb-flyer-col-full { grid-column: 1 / -1; }

/* ── Color Picker Row ── */
.dmb-color-scheme-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.dmb-color-swatch {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: border-color .15s, transform .15s;
    position: relative;
    flex-shrink: 0;
}
.dmb-color-swatch:hover { transform: scale(1.12); }
.dmb-color-swatch.active { border-color: #2d1f13; }
.dmb-color-swatch.active::after {
    content: '✓';
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .8rem;
    font-weight: 900;
    color: inherit;
}

/* ── Flyer Preview Wrapper ── */
#dmb-flyer-preview-wrap {
    display: none;
    padding: 24px;
    background: #f0ebe5;
    border-top: 1px solid #e8ddd4;
    text-align: center;
}
#dmb-flyer-preview-wrap h4 {
    font-size: .85rem;
    font-weight: 700;
    color: #8a7060;
    text-transform: uppercase;
    letter-spacing: .5px;
    font-family: -apple-system, sans-serif;
    margin-bottom: 16px;
}
#dmb-flyer-canvas-wrap {
    display: inline-block;
    box-shadow: 0 8px 40px rgba(0,0,0,.22);
    border-radius: 4px;
    overflow: hidden;
    max-width: 100%;
}
#dmb-flyer-canvas-wrap canvas {
    display: block;
    max-width: 100%;
    height: auto;
}

/* ── Flyer Action Buttons (after generate) ── */
.dmb-flyer-actions {
    display: none;
    gap: 10px;
    justify-content: center;
    margin-top: 16px;
    flex-wrap: wrap;
}
.dmb-flyer-actions.visible { display: flex; }

.dmb-btn-download-flyer {
    background: #1a1a1a;
    color: #f5c518;
    border: 2px solid #f5c518;
    padding: 10px 24px;
    border-radius: 8px;
    font-size: .9rem;
    font-weight: 700;
    font-family: 'Georgia', serif;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    transition: background .15s, color .15s;
}
.dmb-btn-download-flyer:hover {
    background: #f5c518;
    color: #1a1a1a;
    text-decoration: none;
}

/* ── Generating spinner state ── */
.dmb-flyer-generating {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 30px;
    color: #8a7060;
    font-size: .9rem;
    font-family: -apple-system, sans-serif;
}
.dmb-flyer-generating .dmb-spinner {
    width: 24px;
    height: 24px;
    border: 3px solid #e8ddd4;
    border-top-color: #c8703a;
    border-radius: 50%;
    animation: dmb-spin .7s linear infinite;
}

/* ── Pet selector (populate from existing pets) ── */
.dmb-pet-quick-select {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.dmb-pet-quick-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    border: 1.5px solid #e8ddd4;
    background: #fff;
    font-size: .77rem;
    font-weight: 600;
    color: #7c4f2f;
    font-family: -apple-system, sans-serif;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.dmb-pet-quick-chip:hover,
.dmb-pet-quick-chip.active {
    border-color: #c8703a;
    background: #fff6f0;
    color: #c8703a;
}
.dmb-pet-quick-chip img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}