/**
 * Open Workshop Booking Interface Styles
 *
 * @package GungaShopOpenWorkshop
 */

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

/* ============================================
   WRAPPER
   ============================================ */
.gsow-datepicker-wrapper {
    width: calc(100% - 15rem);
    border: none;
    font-family: 'Quicksand', sans-serif;
    margin: 20px auto;
    background-color: #EFEFEA;
    border-radius: 10px;
    padding: 20px;
}

/* ============================================
   DATEPICKER
   ============================================ */
.gsow-datepicker {
    padding: .2em .2em 0;
    display: block;
    font-size: 1.1em;
}

.gsow-datepicker::before,
.gsow-datepicker::after {
    content: "";
    display: table;
    border-collapse: collapse;
}

.gsow-datepicker a:link,
.gsow-datepicker a:visited,
.gsow-datepicker a:hover,
.gsow-datepicker a:active {
    text-decoration: none;
    color: #000;
}

.gsow-datepicker a:hover {
    cursor: pointer;
}

.gsow-datepicker-header {
    display: flex;
    width: 100%;
    height: 50px;
    align-items: center;
    font-weight: 700;
}

.gsow-datepicker-prev,
.gsow-datepicker-next {
    width: 30px;
    user-select: none;
}

.gsow-datepicker-next {
    padding-right: 20px;
}

.gsow-datepicker-prev {
    padding-left: 20px;
}

.gsow-datepicker-title {
    text-align: center;
    width: 100%;
}

/* Calendar Table */
.gsow-datepicker-calendar {
    width: 100%;
    font-size: .9em;
    border-collapse: collapse;
    margin: 0 0 .4em;
}

.gsow-datepicker-calendar th {
    padding: .7em .3em;
    text-align: center;
    font-weight: bold;
    border: 0;
}

.gsow-datepicker-calendar td {
    border: 0;
    padding: 1px;
    width: 14%;
}

.gsow-datepicker-calendar td a,
.gsow-datepicker-calendar td span {
    display: block;
    padding: 0.5em;
    text-decoration: none;
    text-align: center;
}

/* Calendar states */
.gsow-datepicker-state-default {
    text-align: center;
}

.gsow-datepicker-state-disabled {
    cursor: default !important;
    pointer-events: none;
    opacity: 0.35;
}

.gsow-datepicker-state-hover {
    background-color: #dadada;
}

.gsow-datepicker-state-highlight {
    border: none;
    background: #fff;
    color: #dcac72;
}

.gsow-datepicker-state-active,
a.gsow-datepicker-state-active,
.gsow-datepicker-calendar td.gsow-datepicker-state-active a,
.gsow-datepicker-calendar td.gsow-datepicker-state-active span {
    border: none;
    background: #000 !important;
    font-weight: normal;
    color: #fff !important;
}

/* Partial booked indicator */
.gsow-datepicker-calendar td.gsow-partial a:before,
.gsow-datepicker-calendar td.gsow-partial span:before {
    display: inline-block;
    background-color: rgba(1, 1, 1, 1);
    border-radius: 5px;
    content: "";
    margin: 0.11em 0.1em;
    width: 5px;
    height: 5px;
}

/* SVG icons */
svg {
    fill: #444;
}

svg:hover {
    cursor: pointer;
    fill: #000;
}

/* ============================================
   SLOT PICKER
   ============================================ */
.gsow-slot-picker {
    border-top: 1px dashed rgba(0, 0, 0, .05);
    padding: 0.9em 0;
    font-family: 'Quicksand', sans-serif;
    width: 100%;
    border-bottom: 1px dashed rgba(0, 0, 0, .05);
}

.gsow-slot-picker a:link,
.gsow-slot-picker a:visited,
.gsow-slot-picker a:hover,
.gsow-slot-picker a:active {
    text-decoration: none;
    color: #000;
}

.gsow-slot-picker-start {
    font-size: larger;
    text-align: center;
    padding: 2em 0;
}

.gsow-slot-picker h2 {
    text-align: center;
    margin-bottom: 20px;
}

/* Slots list */
.gsow-slots-list {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.gsow-slots-list li {
    line-height: 40px;
    list-style: none;
    margin: 0;
    position: relative;
    height: 50px;
    text-align: center;
    vertical-align: middle;
}

.gsow-slots-list li a {
    color: inherit;
    display: block;
    height: 100%;
    line-height: 50px;
}

.gsow-slots-list li:hover {
    background-color: #000;
    cursor: pointer;
    color: #fff;
}

.gsow-slots-list li.selected {
    background-color: #000;
    color: #fff;
}

.gsow-slots-list li.gsow-state-disabled {
    cursor: default !important;
    pointer-events: none;
    opacity: 0.35;
}

.gsow-slot-time {
    font-size: 1em;
    font-weight: 500;
}

.gsow-slot-availability {
    font-size: 0.85em;
    font-weight: 400;
    margin-left: 8px;
    opacity: 0.8;
}

.gsow-slots-list li.gsow-slot-low-availability .gsow-slot-availability {
    color: #d9534f;
    font-weight: 600;
    opacity: 1;
}

.gsow-slots-list li.gsow-slot-low-availability:hover .gsow-slot-availability,
.gsow-slots-list li.gsow-slot-low-availability.selected .gsow-slot-availability {
    color: #ffcccc;
}

/* Smaller slot items on large screens */
@media (min-width: 768px) {
    .gsow-slots-list {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .gsow-slots-list li {
        width: 50%;
        box-sizing: border-box;
    }
}

/* ============================================
   CONFIRM DIALOG
   ============================================ */
.gsow-confirm-dialog {
    text-align: center;
    margin: 20px auto;
    max-width: 800px;
}

.gsow-confirm-date {
    font-size: x-large;
    font-weight: 700;
    margin-bottom: 20px;
}

.gsow-confirm-button,
#gsow-book-button {
    display: block;
    background-color: var(--primary-color, #000);
    border: 1px solid var(--primary-color, #000);
    padding: 20px;
    border-radius: 7px;
    line-height: 0px;
    font-family: 'Quicksand', sans-serif;
    font-size: medium;
    margin: 10px auto;
    color: #fff;
    cursor: pointer;
    width: 100%;
    max-width: 300px;
}

.gsow-confirm-button:hover,
#gsow-book-button:hover {
    opacity: 0.85;
}

.gsow-confirm-button:disabled,
#gsow-book-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   FORM STYLING
   ============================================ */
.gsow-confirm-dialog .form-floating > label {
    left: 7px !important;
}

.gsow-confirm-dialog h5 {
    margin-bottom: 15px;
    font-weight: 600;
}

.gsow-confirm-dialog .form-check-label {
    font-weight: 500;
}

.gsow-confirm-dialog .form-check-input.is-invalid {
    border-color: #dc3545;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (min-width: 1281px) {
    .gsow-datepicker,
    .gsow-slot-picker {
        width: 100%;
    }
}

@media (min-width: 1025px) and (max-width: 1280px) {
    .gsow-datepicker,
    .gsow-slot-picker {
        width: 100%;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .gsow-datepicker,
    .gsow-slot-picker {
        width: 100%;
    }
}

@media (min-width: 481px) and (max-width: 767px) {
    .gsow-datepicker,
    .gsow-slot-picker,
    .gsow-datepicker-wrapper {
        width: 100%;
    }

    .gsow-datepicker-wrapper {
        width: 550px;
    }
}

@media (min-width: 320px) and (max-width: 480px) {
    .gsow-datepicker,
    .gsow-slot-picker,
    .gsow-datepicker-wrapper {
        width: 100%;
        padding: 0px;
    }

    .gsow-datepicker-calendar td a,
    .gsow-datepicker-calendar td span {
        padding: 0.5em;
    }

    .col-4 {
        width: 90% !important;
    }

    #gsow-noofhours {
        width: 100%;
    }
}

/* ============================================
   LOADING STATE
   ============================================ */
.gsow-loading {
    text-align: center;
    padding: 30px;
    color: #666;
}

.gsow-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: #000;
    border-radius: 50%;
    animation: gsow-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes gsow-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   MODAL OVERRIDES
   ============================================ */
#gsow-info-modal .modal-content {
    border-radius: 12px;
}

#gsow-info-modal .modal-header {
    border-bottom: none;
    padding-bottom: 0;
}

#gsow-info-modal .modal-footer {
    border-top: none;
    padding-top: 0;
}

#gsow-info-modal .modal-body {
    padding: 20px 30px;
    text-align: center;
}

#gsow-info-modal .modal-body p {
    margin: 0;
    font-size: 1.1em;
}

/* ============================================
   HOURS SELECT
   ============================================ */
#gsow-noofhours {
    font-family: 'Quicksand', sans-serif;
    font-size: 1em;
    padding: 10px 15px;
    border-radius: 0;
    border: 1px solid #ccc;
    background-color: #fff;
    width: 100%;
    max-width: 300px;
}

#gsow-noofhours:focus {
    border-color: #000;
    box-shadow: none;
    outline: none;
}

/* ============================================
   TASK CHECKBOXES
   ============================================ */
.gsow-confirm-dialog .form-check-inline {
    margin-right: 1.5rem;
    margin-bottom: 0.5rem;
}

.gsow-confirm-dialog .form-check-input {
    width: 1.2em;
    height: 1.2em;
    margin-top: 0.15em;
}

.gsow-confirm-dialog .form-check-input:checked {
    background-color: #000;
    border-color: #000;
}
