/* styles */

.sca-table span.normalFont {
	font-weight: normal;
}
.sca-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed; /* THIS is what forces equal width */
}

.sca-table th,
.sca-table td {
    border: 1px solid #999; /* restore borders */
    padding: 12px;
    text-align: center;
    /*white-space: nowrap;*/
    width: 100%;
}

.sca-table th {
    background: #f0f0f0;
}

/* time column fixed width */
.sca-table th:first-child,
.sca-table td:first-child {
    width: 100px;
    background: #fafafa;
    font-weight: bold;
}

/* make rows taller */
.sca-table td {
    height: 50px;
}

.sca-cancel {
    color: red;
    font-size: 16px;
    cursor: pointer;
    margin-left: 6px;
}

.sca-cancel:hover {
    color: darkred;
}

.sca-court-layout {
    display: flex;
    gap: 18px;
    align-items: flex-start;
}

.sca-court-datepicker-wrap {
    flex: 0 0 260px;
}

.sca-court-grid-wrap {
    flex: 1;
    min-width: 0;
}

.sca-court-table td.past,
.sca-court-table td.reserved.past {
    background: #f3f3f3;
    color: #999;
}

.sca-court-table td.past a {
    display: none;
}

.sca-court-grid-wrap td.past {
  background: repeating-linear-gradient(
    45deg,
    #f5f5f5,
    #f5f5f5 5px,
    #e9e9e9 5px,
    #e9e9e9 10px
  );
  color: #aaa;
  pointer-events: none;
}

@media (max-width: 700px) {
    .sca-court-layout {
        flex-direction: column;
    }

    .sca-court-datepicker-wrap,
    .sca-court-grid-wrap {
        width: 100%;
    }
}

/* ------------- Show accordion help panel ---------------------- */

.pasHelpBox {
    margin: 0;
}

.pasHelpArrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 8px;
}

.pasHelpArrowIcon {
    display: inline-block;
    width: 14px;
    text-align: center;
    font-size: 12px;
}

.pasHelpArrowLabel {
    display: inline-block;
}

.pasHelpContent {
    margin-top: 5px;
    background: #faf8f3;
    padding: 10px;
    border-radius: 10px;
    display: none;
    border: 1px solid black !important;
    margin-bottom: 10px;
}

.pasHelpContentInner {
    width: 100%;
    line-height: 1.6;
    color: #222;
}

.pasHelpContentInner h3 {
    margin: 0 0 15px 0;
}

.pasHelpContentInner p {
    margin: 0 0 12px 0;
}

.pasHelpSearchFlow {
    font-weight: 600;
    font-size: 16px;
    margin-left: 10px;
}

.pasHelpHighlight {
    color: #dd3333;
    font-weight: 700;
}

.pasHelpTip {
    font-style: italic;
    margin-top: 18px;
}

.pasHelpList {
    margin: 12px 0 16px 20px;
    padding: 0;
}

.pasHelpList li {
    margin-bottom: 12px;
    line-height: 1.6;
}

/* ----------------- Tooltip call text ------------------ */

/* Container for the name (makes tooltip positioning work) */
.sca-reserved-name {
    position: relative;
    cursor: pointer;
    display: inline-block;
}

/* Tooltip box */
.sca-tooltip {
    display: none;
    position: absolute;
    z-index: 9999;

    left: 50%;
    top: 100%;
    transform: translateX(-50%);

    min-width: 160px;
    max-width: 220px;

    background: #fff;
    color: #333;
    border: 1px solid #aaa;
    border-radius: 6px;
    padding: 8px 10px;

    box-shadow: 0 2px 8px rgba(0,0,0,.2);
    font-size: 13px;
    line-height: 1.4;

    white-space: normal;
}

/* Show tooltip on hover (desktop) */
.sca-reserved-name:hover .sca-tooltip,
.sca-reserved-name:focus-within .sca-tooltip,
.sca-reserved-name.sca-tooltip-open .sca-tooltip {
    display: block;
}

/* Tooltip links */
.sca-tooltip a {
    color: #0066cc;
    text-decoration: underline;
    margin: 0 3px;
}

.sca-tooltip a:hover {
    color: #004999;
}

/* Optional: nicer name styling */
.sca-name {
    font-weight: 500;
}

/* Optional: past slots look muted */
.sca-court-table td.past,
.sca-court-table td.reserved.past {
    background: #f3f3f3;
    color: #999;
}

/* Optional: hide reserve links in past */
.sca-court-table td.past a {
    display: none;
}

/* Optional: style the cancel button a bit */
.sca-cancel {
    margin-left: 6px;
    background: transparent;
    border: none;
    color: #cc0000;
    font-weight: bold;
    cursor: pointer;
}

.sca-cancel:hover {
    color: #990000;
}

.sca-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    width: 26px;
    height: 26px;
    margin-left: 6px;

    border: 1px solid #b00000;
    border-radius: 50%;
    background: #fff;
    color: #b00000;

    font-size: 16px;
    font-weight: bold;
    line-height: 1;
    cursor: pointer;
    padding: 0;
}

.sca-cancel:hover,
.sca-cancel:focus {
    background: #b00000;
    color: #fff;
    outline: none;
}

/* ------------- Recurring reservations ------------------ */

/*.sca-recurring-admin {
    margin: 18px 0;
    padding: 14px;
    border: 1px solid #ccc;
    background: #fafafa;
    border-radius: 6px;
}*/

#sca-recurring-form-wrap {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #ddd;
}

#sca-recurring-form-wrap input,
#sca-recurring-form-wrap select {
    max-width: 320px;
    width: 100%;
    height: 35px;
}

#sca-recurring-weekdays-wrap label {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 8px;
}

/*.sca-admin-button {
    padding: 8px 14px;
    border: 1px solid #245f9e;
    background: #2f74bd;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}*/

.sca-admin-button:hover {
    background: #245f9e;
}

.sca-success {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #8bc48b;
    background: #eef9ee;
}

.sca-error {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #cc7777;
    background: #fff0f0;
}

/* added */
.sca-recurring-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px 16px;
    margin-top: 10px;
}

.sca-recurring-grid p {
    margin: 0;
}

.sca-recurring-grid label {
    display: block;
    font-weight: 500;
    margin-bottom: 2px;
}

.sca-recurring-grid input,
.sca-recurring-grid select {
    width: 100%;
    max-width: none;
}

.sca-recurring-grid .full-width,
#sca-recurring-weekdays-wrap.full-width {
    grid-column: 1 / -1;
}

#sca-recurring-weekdays-wrap {
    margin: 0;
    padding: 6px 0;
}

#sca-recurring-weekdays-wrap label {
    display: inline-block;
    margin-right: 12px;
    margin-bottom: 4px;
    font-weight: normal;
}

.sca-recurring-actions {
    margin: 12px 0 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

@media (max-width: 700px) {
    .sca-recurring-grid {
        grid-template-columns: 1fr;
    }
}

/* more */

.sca-form-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.sca-form-table th {
    text-align: left;
    vertical-align: middle;
    padding: 6px 10px 6px 0;
    width: 180px;
    font-weight: 600;
    white-space: nowrap;
}

.sca-form-table td {
    padding: 6px 0;
}

.sca-form-table input,
.sca-form-table select {
    width: 100%;
    max-width: 320px;
}

#sca-recurring-weekdays-wrap label {
    display: inline-block;
    margin-right: 10px;
}

.sca-recurring-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.select2-container {
    max-width: 320px;
}

.select2-container .select2-selection--single {
    height: 34px;
    padding: 4px;
}

/* ----- upcoming reservations table ---- */

#sca-my-reservations-wrap {
    margin: 14px 0;
}

.sca-my-reservations-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #bbb;
}

.sca-my-reservations-table th,
.sca-my-reservations-table td {
    border: 1px solid #ccc;
    padding: 6px 10px;
    text-align: left;
}

.sca-my-reservations-table th {
    background: #f5f5f5;
    font-weight: 600;
}

.sca-my-reservations-table tr:nth-child(even) {
    background: #fafafa;
}

.sca-my-reservations-table tr:hover {
    background: #f0f7ff;
}

.sca-my-reservations-empty {
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid #ddd;
}

.sca-cancel-my-reservation {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border: 1px solid #b00000;
    border-radius: 50%;
    background: #fff;
    color: #b00000;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    padding: 0;
}

.sca-cancel-my-reservation:hover {
    background: #b00000;
    color: #fff;
}

#sca-my-reservations-wrap {
    max-height: 360px;
    overflow-y: auto;
    margin: 14px 0;
    margin-top: 0;
}

