@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
    --cbs-primary: #be1e2d; /* Coalesce Crimson */
    --cbs-primary-dark: #8e1622;
    --cbs-dark: #1e1e1e;
    --cbs-bg: #ffffff;
    --cbs-border: #e2e8f0;
    --cbs-radius: 12px;
}

.cbs-booking-container {
    font-family: 'Inter', sans-serif;
    max-width: 550px;
    margin: 40px auto;
    padding: 40px;
    background: var(--cbs-bg);
    border-radius: 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.1);
    border: 1px solid var(--cbs-border);
    overflow: hidden;
}

.cbs-brand-logo {
    text-align: center;
    margin-bottom: 30px;
}

.cbs-brand-logo img {
    max-width: 240px;
    height: auto;
}

/* Steps */
.cbs-form-step {
    display: none;
}
.cbs-form-step.active {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

.cbs-booking-header {
    text-align: center;
    margin-bottom: 35px;
}

.cbs-booking-header h2 {
    font-size: 26px;
    font-weight: 800;
    color: var(--cbs-dark);
    margin: 0 0 8px;
    letter-spacing: -0.5px;
}

.cbs-booking-header p {
    color: #64748b;
    font-size: 14px;
}

.cbs-user-info-bar {
    background: #f8fafc;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e2e8f0;
}

.cbs-user-meta {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    display: flex;
    flex-direction: column;
}

.cbs-credit-tag {
    color: var(--cbs-primary);
    font-size: 12px;
}

.cbs-btn-link {
    background: transparent;
    border: none;
    color: var(--cbs-primary);
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: underline;
}

.cbs-btn-logout {
    background: #fff;
    border: 1px solid #cbd5e1;
    color: #475569;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.cbs-btn-logout:hover {
    background: #f1f5f9;
    color: var(--cbs-primary);
    border-color: var(--cbs-primary);
}
.cbs-btn-logout .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.cbs-alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    font-weight: 500;
}
.cbs-alert-warning {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}
.cbs-alert-warning .dashicons {
    color: #d97706;
}

.cbs-form-group {
    margin-bottom: 24px;
}

.cbs-form-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 15px;
}

.cbs-form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    color: #475569;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cbs-form-group input,
.cbs-form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid var(--cbs-border);
    border-radius: var(--cbs-radius);
    font-size: 15px;
    transition: all 0.2s ease;
    background: #f8fafc;
    color: var(--cbs-dark);
}

.cbs-form-group input:focus,
.cbs-form-group select:focus {
    border-color: var(--cbs-primary);
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 4px rgba(190, 30, 45, 0.1);
}

/* Attendee Search */
.cbs-attendee-search-wrapper {
    position: relative;
}
.cbs-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    z-index: 100;
    display: none;
    max-height: 200px;
    overflow-y: auto;
}
.cbs-search-item {
    padding: 10px 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}
.cbs-search-item:hover {
    background: #f1f5f9;
}

.cbs-selected-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}
.cbs-tag {
    background: #eff6ff;
    color: #2563eb;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}
.cbs-remove-tag {
    cursor: pointer;
    font-style: normal;
    font-weight: 700;
    color: #ef4444;
}

.cbs-btn-primary {
    width: 100%;
    padding: 16px 24px;
    background: var(--cbs-primary) !important;
    color: white !important;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
}

.cbs-btn-primary:hover {
    background: var(--cbs-primary-dark) !important;
    box-shadow: 0 10px 20px rgba(190, 30, 45, 0.3);
}

/* Modal */
.cbs-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}
.cbs-modal.active {
    display: flex;
}
.cbs-modal-content {
    background: #fff;
    padding: 40px;
    border-radius: 24px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    animation: modalPop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modalPop {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.cbs-modal-header .dashicons {
    font-size: 64px;
    width: 64px;
    height: 64px;
    color: #22c55e;
    margin-bottom: 20px;
}

.cbs-calendar-options {
    margin: 30px 0;
    padding: 24px;
    background: #f8fafc;
    border-radius: 20px;
}
.cbs-calendar-options h4 {
    margin: 0 0 20px;
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
}

.cbs-calendar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}
.cbs-cal-btn {
    padding: 12px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s ease;
}
.cbs-icon {
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    display: inline-block;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    vertical-align: middle;
}

/* Premium Icons via Inline SVGs or reliable sources */
.cbs-cal-btn.google { background: #fff; color: #4285f4; border: 1px solid #e2e8f0; }
.cbs-cal-btn.google .cbs-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%23EA4335' d='M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z'/%3E%3Cpath fill='%234285F4' d='M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z'/%3E%3Cpath fill='%23FBBC05' d='M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z'/%3E%3Cpath fill='%2334A853' d='M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z'/%3E%3C/svg%3E"); }

.cbs-cal-btn.outlook { background: #0078d4; color: #fff; }
.cbs-cal-btn.outlook .cbs-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48'%3E%3Cpath fill='%230078d4' d='M24,4C12.95,4,4,12.95,4,24s8.95,20,20,20s20-8.95,20-20S35.05,4,24,4z M28.6,33.4c-0.6,0.5-1.3,0.7-2.1,0.7 c-0.8,0-1.5-0.2-2.1-0.7c-0.6-0.5-0.9-1.3-0.9-2.3c0-1,0.3-1.8,0.9-2.3c0.6-0.5,1.3-0.7,2.1-0.7s1.5,0.2,2.1,0.7 c0.6,0.5,0.9,1.3,0.9,2.3C29.5,32.1,29.2,32.9,28.6,33.4z M28.6,22.4c-0.6,0.5-1.3,0.7-2.1,0.7s-1.5-0.2-2.1-0.7 c-0.6-0.5-0.9-1.3-0.9-2.3c0-1,0.3-1.8,0.9-2.3c0.6-0.5,1.3-0.7,2.1-0.7s1.5,0.2,2.1,0.7c0.6,0.5,0.9,1.3,0.9,2.3 C29.5,21.1,29.2,21.9,28.6,22.4z'/%3E%3C/svg%3E"); filter: brightness(0) invert(1); }

.cbs-cal-btn.apple { background: #000; color: #fff; }
.cbs-cal-btn.apple .cbs-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 384 512'%3E%3Cpath fill='white' d='M318.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C63.3 141.2 4 184.8 4 273.5q0 39.3 14.4 81.2c12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z'/%3E%3C/svg%3E"); }

.cbs-cal-btn.yahoo { background: #6001d2; color: #fff; }
.cbs-cal-btn.yahoo .cbs-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 512 512'%3E%3Cpath fill='white' d='M387.2 44.8L256 226.7L124.8 44.8H34.4L204.8 288v179.2h102.4V288L477.6 44.8h-90.4z'/%3E%3C/svg%3E"); }

.cbs-cal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.cbs-btn-close-modal {
    width: 100%;
    padding: 14px;
    background: var(--cbs-dark);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    cursor: pointer;
}

.cbs-active-bookings {
    margin-top: 40px;
    border-top: 2px solid #f1f5f9;
    padding-top: 35px;
}

.cbs-active-bookings h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--cbs-dark);
    font-weight: 700;
}

.cbs-booking-item {
    background: #f8fafc;
    padding: 18px;
    border-radius: var(--cbs-radius);
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid var(--cbs-border);
}

.cbs-booking-info h4 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.cbs-booking-info p {
    margin: 4px 0 0;
    font-size: 12px;
    color: #64748b;
}

.cbs-cancel-btn {
    padding: 8px 14px;
    background: #fff;
    color: var(--cbs-primary);
    border: 1px solid var(--cbs-primary);
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
}

/* Fix for datetime-local placeholder */
input[type="datetime-local"]:before {
    content: attr(placeholder);
    color: #94a3b8;
    margin-right: 1.0em;
    display: block;
}
input[type="datetime-local"]:focus:before,
input[type="datetime-local"]:valid:before {
    content: "";
    display: none;
}

@media (max-width: 640px) {
    .cbs-booking-container {
        margin: 10px;
        padding: 25px;
    }
    .cbs-form-row {
        grid-template-columns: 1fr;
    }
}
