:root {
    --accent-blue:#1d6c91;
    --accent-red:#cc4040;
    --accent-green:#40ccb9;
    /* Shades of gray. 1 = darkest. */
    --gray-1:#E7E7E7; /* Content borders, level 1. */
    --gray-2:#F5F5F5; /* Title background, level 1. */
    --gray-3:#F2F2F2; /* Content borders, level 2. */
    --gray-4:#FAFAFA; /* Title background, level 2. */


    --gray-a:#8b8b8b9a; /* Gray with alpha. */


    --main-shadow:#00000000; /* Can also be #bdbdbd7e. */


    --general-border-radius:8px;
}
* {
    /* Include margins and padding in the size calculation. */
    box-sizing: border-box;
}
.booking-place-title, 
.booking-title,
.regular-text {
    /* Instead of fixed sizes, use relative units or inherit */
    font-family: inherit; 
    color: inherit;
    line-height: 1.5;
}
.booking-title {
    font-weight: 600;
    font-size: 22px;
    padding: 12px;
    border: var(--gray-a) solid 1px;
}
.booking-place-container {
    display: flex;
    flex-direction: column;
    border: var(--gray-a) solid 1px;
    padding: 20px;
    box-shadow: 0 4px 8px  var(--main-shadow);
    margin: 0;
}
.booking-place-container:hover {
    transition: all 0.17s ease-in-out;
    background-color: var(--gray-a);
    border-left: 4px solid var(--accent-blue);
}
.booking-place-title {
    font-size: 22px;
    font-weight: 600;
}
.booking-place-desc {
    font-size: 16px;
    line-height: 1.5;
    padding-block: 0.1em;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    line-clamp: 3;
}
.booking-place-details {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 24px;
    align-items: start;
}
.booking-place-details-description,
.booking-place-details-calendar {
    min-width: 0;
}
.tbs-place-start-suggestion {
    width: fit-content;
    margin: 6px 0 10px;
    padding: 6px 10px;
    border-radius: 4px;
    color: #174f69;
    background: #e3f2f8;
    font-size: 0.95rem;
}
@media (max-width: 600px) {
    .booking-place-details {
        grid-template-columns: minmax(0, 1fr);
    }
}
.booking-place-full-description {
    padding: 12px;
    border: var(--gray-a) solid 1px;
    font-size: 16px;
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.form-return button{
    font-weight: 700;
    padding: 6px 12px;
    border-radius: var(--general-border-radius);
    border: var(--gray-a) solid 1px;
}
.form-return button:hover {
    transition: all 0.07s ease-in-out;
    border-left: 4px solid var(--accent-red);
    cursor: pointer;
    background-color: var(--gray-a);
}
.main-container {
    display: flex;
    flex-direction: column;
    margin: 0;
    box-shadow: 0 4px 8px  var(--main-shadow);
}
.regular-text {
    font-weight: 600;
    font-size: 20px;
    padding: 12px;
    box-shadow: 0 4px 8px  var(--main-shadow);
}
.main-container-content {
    display: grid;
    grid-template-columns: repeat(2,2fr);
    margin: 0;
    justify-content: space-between;
    border: var(--gray-a) solid 1px;
    min-height: 80px;
    padding: 10px;
    width: 100%;
    align-items: center;
}
.main-container-content-title {
    font-size: 16px;
    font-weight: 100 bolder;
}
.main-container button {
    font-weight: 600;
    font-size: 16px;
    padding: 12px;
    border: var(--gray-a) solid 1px;
    margin: 5px;
    width: calc(100% - 10px);
    cursor: pointer;
    border-radius: var(--general-border-radius);
}
.main-container button:hover {
    transition: all 0.07s ease-in-out;
    border-left: 4px solid var(--accent-blue);
}
.main-container-content input,
.main-container-content select {
    width: 100%;
    height: 40px;
    min-height: 40px;
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.1);
}
.main-container-content textarea {
    width: 100%;
    min-height: 120px;
    resize: vertical;
    font-family: inherit;
    font-size: 1rem;
    color: inherit;
    border: 1px solid rgba(0,0,0,0.1);
}
.main-container-content.tbs-general-instructions-consent {
    display: block;
    min-height: 0;
    padding: 16px;
}
.tbs-general-instructions-consent label {
    align-items: flex-start;
    display: flex;
    gap: 1px;
}
.main-container-content.tbs-general-instructions-consent input[type="checkbox"] {
    flex: 0 0 44px;
    margin-top: 2px;
    max-width: 44px;
    width: 44px;
}
#tbs-new-school-fields {
    grid-column: 2;
    width: 100%;
}
#tbs-new-school-fields label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}
.tbs-submit-button:hover {
    background-color: var(--gray-a);
}
@media (max-width:600px) {
    .main-container-content {
        flex-direction: column;
        grid-template-columns: repeat(1,2fr);
        min-height: 110px;
    }
    #tbs-new-school-fields {
        grid-column: auto;
    }
}

.tbs-full-notice {
    background-color: #fff0f0;
    border-left: 4px solid var(--accent-red);
    color: var(--accent-red);
    padding: 12px 16px;
    font-weight: 600;
    font-size: 15px;
    margin: 4px 0;
}

.tbs-availability-calendar {
    padding: 14px;
    border: var(--gray-a) solid 1px;
    background: var(--gray-4);
}
.tbs-calendar-title {
    display: flex;
    align-items: center;
    gap: 8px;
}
.tbs-calendar-title .regular-text {
    flex: 1;
    margin: 0;
}
.tbs-calendar-help-toggle {
    display: inline-grid;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--gray-a);
    border-radius: 50%;
    place-items: center;
    color: inherit;
    background: transparent;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}
.tbs-calendar-help-toggle:focus {
    color: inherit;
    border-color: var(--gray-a);
    background: transparent;
}
.tbs-calendar-help-toggle:hover,
.tbs-calendar-help-toggle:focus-visible,
.tbs-calendar-help-toggle[aria-expanded="true"] {
    color: #fff;
    border-color: var(--accent-blue);
    background: var(--accent-blue);
}
.tbs-calendar-instructions {
    margin: 0 0 12px;
    line-height: 1.5;
}
.tbs-calendar-instructions[hidden] {
    display: none;
}
.tbs-selected-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding: 12px 14px;
    border: var(--gray-a) solid 1px;
    background: var(--gray-4);
}
@media (max-width: 600px) {
    .tbs-selected-dates {
        grid-template-columns: minmax(0, 1fr);
    }
}
.tbs-calendar-header {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}
.tbs-calendar-header h3 {
    margin: 0;
    text-align: center;
    text-transform: capitalize;
    font-size: 1.05rem;
}
.main-container .tbs-calendar-nav {
    width: 44px;
    min-height: 40px;
    margin: 0;
    padding: 6px;
}
.tbs-calendar-weekdays,
.tbs-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}
.tbs-calendar-weekdays span {
    padding: 4px 0;
    text-align: center;
    font-size: .78rem;
    font-weight: 700;
}
.main-container .tbs-calendar-days button {
    width: 100%;
    min-width: 0;
    min-height: 40px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--gray-1);
    border-radius: 4px;
    background: #fff;
    color: #222;
    opacity: 1;
}
.main-container .tbs-calendar-days button:disabled:not(.is-full) {
    color: #8b8b8b;
    background: var(--gray-2);
    opacity: .65;
}
.main-container .tbs-calendar-days button.is-full {
    color: #7c2525;
    background: #f4caca;
    text-decoration: line-through;
    opacity: 1;
    cursor: not-allowed;
}
.main-container .tbs-calendar-days button.is-selected {
    color: #fff;
    background: var(--accent-blue);
    border-color: var(--accent-blue);
}
.tbs-calendar-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    font-size: .85rem;
}
.tbs-calendar-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.tbs-calendar-legend i {
    width: 16px;
    height: 16px;
    border-radius: 3px;
}
.tbs-calendar-legend-full { background: #f4caca; }
.tbs-calendar-legend-selected { background: var(--accent-blue); }

.tbs-certificate-request-form {
    display: grid;
    gap: 10px;
    max-width: 520px;
}
.tbs-certificate-request-form label { font-weight: 600; }
.tbs-certificate-request-form input,
.tbs-certificate-request-form button {
    min-height: 44px;
    padding: 10px 12px;
    font: inherit;
}
.tbs-certificate-request-form button { cursor: pointer; font-weight: 600; }
.tbs-request-message {
    margin: 12px 0;
    padding: 12px 16px;
    border-left: 4px solid var(--accent-green);
    background: var(--gray-4);
}
.tbs-request-error { border-left-color: var(--accent-red); }

.tbs-shortcode-maintenance {
    margin-bottom: 40px;
}

.tbs-application-summary { box-sizing:border-box; max-width:760px; margin:0 auto 16px; padding:16px 20px; border-left:4px solid var(--accent-blue); background:var(--gray-4); }
.tbs-application-summary h3 { margin:0 0 10px; }
.tbs-application-summary dl { display:grid; margin:0; gap:8px; }
.tbs-application-summary dl > div { display:grid; grid-template-columns:minmax(100px, 1fr) 2fr; gap:12px; }
.tbs-application-summary dt { font-weight:700; }
.tbs-application-summary dd { margin:0; }
@media(max-width:520px){.tbs-application-summary dl > div{grid-template-columns:1fr;gap:2px}}

.tbs-chat-public { box-sizing:border-box; width:min(760px,100%); margin:20px auto; padding:20px; border:1px solid var(--gray-1); border-radius:8px; background:#fff; }
.tbs-chat-public .tbs-chat-messages { height:min(55vh,520px); padding:16px; overflow:auto; background:var(--gray-4); border-radius:6px; }
.tbs-chat-public .tbs-chat-messages-wrap { position:relative; }
.tbs-chat-public .tbs-new-messages { position:absolute; z-index:2; right:50%; bottom:12px; padding:8px 14px; border:0; border-radius:18px; color:#fff; background:var(--accent-blue); box-shadow:0 2px 8px rgba(0,0,0,.22); font-weight:600; cursor:pointer; transform:translateX(50%); }
.tbs-chat-public .tbs-new-messages[hidden] { display:none; }
.tbs-chat-public .tbs-message { width:fit-content; max-width:80%; margin:0 0 12px; }
.tbs-chat-public .tbs-message > div { width:fit-content; max-width:100%; padding:10px 14px; border-radius:14px; background:#fff; overflow-wrap:anywhere; box-shadow:0 1px 2px rgba(0,0,0,.08); text-align:left; }
.tbs-chat-public .tbs-message.is-own { margin-left:auto; text-align:right; }
.tbs-chat-public .tbs-message.is-own > div { margin-left:auto; color:#fff; background:var(--accent-blue); }
.tbs-chat-public .tbs-message small { display:block; margin-top:3px; color:#68737d; }
.tbs-chat-public .tbs-message-meta { display:flex; margin-top:3px; align-items:center; gap:7px; }
.tbs-chat-public .tbs-message-meta small { margin-top:0; }
.tbs-chat-public .tbs-message.is-own .tbs-message-meta { justify-content:flex-end; }
.tbs-chat-public .tbs-chat-form { display:flex; flex-wrap:wrap; margin-top:12px; gap:10px; }
.tbs-chat-public .tbs-attachment-draft { flex-basis:100%; min-width:0; overflow-wrap:anywhere; }
.tbs-chat-public .tbs-message > div a { color:inherit; text-decoration:underline; }
.tbs-chat-public .tbs-chat-form[hidden] { display:none; }
.tbs-chat-public .tbs-chat-form textarea { box-sizing:border-box; min-height:70px; padding:10px; flex:1; resize:vertical; }
.tbs-chat-public .tbs-chat-form button { min-width:100px; padding:10px 16px; cursor:pointer; }
.tbs-chat-public .tbs-attachment-button { display:inline-flex; min-height:44px; padding:8px 12px; border:1px solid var(--gray-1); border-radius:4px; box-sizing:border-box; align-items:center; cursor:pointer; white-space:nowrap; }
.tbs-chat-public .tbs-attachment-button input { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0,0,0,0); }
.tbs-chat-public .tbs-message-attachment { display:flex; width:fit-content; max-width:100%; margin-top:5px; padding:8px 10px; border-radius:8px; background:#fff; overflow-wrap:anywhere; }
.tbs-chat-public .tbs-message.is-own .tbs-message-attachment { margin-left:auto; background:#dceaf7; }
.tbs-chat-public .tbs-chat-closed { margin:12px 0 0; padding:12px 14px; border-left:4px solid var(--gray-1); background:var(--gray-4); }
@media(max-width:600px){.tbs-chat-public .tbs-chat-form{flex-direction:column}.tbs-chat-public .tbs-message{max-width:92%}}
