/*
Theme Name: Flatsome Child
Description: This is a child theme for Flatsome Theme
Author: UX Themes
Template: flatsome
Version: 3.0
*/

/*************** ADD CUSTOM CSS HERE. ***************/

/* Modal styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1000; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0, 0, 0, 0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 20px;
    border: 1px solid #ccc;
    border-radius: 10px;
    width: 80%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    position: relative;
}

.modal-logo {
    display: block;
    margin: 0 auto 20px auto;
    max-width: 150px;
}

.close {
    color: #ef3912;
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}

/* Button styles */
.button-container {
    text-align: center;
    margin-bottom: 1px;
}

button#go-back-calendar, button#go-back-delivery-type {
    display: inline-block;
    padding: 8px 12px;
    margin: 10px;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
    background-color: #ff5853f5;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
    text-align: center;
    width: auto;
}

button#go-back-calendar:hover, button#go-back-delivery-type:hover {
    background-color: #ff5853f5;
    transform: scale(1.05);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #000;
}

/* Content area styles */
#calendar_content, #delivery_type_content, #timeslot_content {
    margin-top: 20px;
    background-color: #f9f9f9;
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

/* Revised radio button alignment styles */
.delivery-type, .timeslot {
    border: 1px solid #5e0000;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    background-color: #fff1f1;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.delivery-type:hover, .timeslot:hover {
    background-color: #f1f1f1;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Updated label styling using inline-flex and gap for spacing */
.delivery-type label, 
.timeslot label {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px; /* Spacing between radio and text */
    font-weight: bold;
    color: #070606;
    width: 100%;
}

/* Remove extra offset and margin for radio buttons */
.delivery-type input[type="radio"], 
.timeslot input[type="radio"] {
    margin: 0;
    vertical-align: middle;
    position: static;
}

.delivery-types, .timeslots {
    margin-bottom: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.delivery-type, .timeslot {
    flex: 1 0 50% !important;
}

/* Center text for slot type */
#delivery_type_content p {
    text-align: center;
    font-size: 18px;
    font-weight: bold;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        padding: 15px;
        margin: 35% auto;
    }
    .close {
        font-size: 24px;
    }
    .delivery-type, .timeslot {
        padding: 8px;
        margin: 2px 0;
        flex: 1 0 100%;
    }
    .delivery-type label, .timeslot label {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    .delivery-type input[type="radio"], .timeslot input[type="radio"] {
        margin-right: 5px;
        vertical-align: middle;
        position: static;
    }
}

@media (min-width: 601px) and (max-width: 1024px) {
    .modal-content {
        width: 90%;
        padding: 20px;
        margin: 10% auto !important;
    }
    .close {
        font-size: 26px;
    }
    .delivery-type, .timeslot {
        padding: 10px;
        margin: 5px 0;
    }
    .delivery-type label, .timeslot label {
        flex-direction: row;
        align-items: center;
        width: 100%;
    }
    .delivery-type input[type="radio"], .timeslot input[type="radio"] {
        margin-right: 5px;
        vertical-align: middle;
        position: static;
    }
}

/* Specific styles for timeslot messages */
#early_morning_timeslots .timeslot-message,
#fixed_timeslots .timeslot-message,
#midnight_timeslots .timeslot-message,
#express_timeslots .timeslot-message,
#morning_timeslots .timeslot-message {
    color: red;
    font-weight: bold;
    margin-top: 20px;
}

/* Center the delivery date text and modal messages */
#calendar_content p,
#selected_delivery_type_message {
    text-align: center;
}

/* Customize calendar popup styles */
body .ui-datepicker {
    background-color: #f9f9f9;
    width: auto;
    margin: 0 auto;
    padding: 10px;
    display: table;
    border: 1px solid #ddd;
    border-radius: 10px;
}

body .ui-widget-header {
    border: 1px solid #fbfbfb;
    background: #000000;
    color: white;
    font-weight: bold;
    z-index: 10001;
}

body .ui-datepicker .ui-datepicker-prev,
body .ui-datepicker .ui-datepicker-next {
    filter: invert(100%);
    z-index: 10002;
}

body .ui-state-highlight,
body .ui-widget-content .ui-state-highlight,
body .ui-widget-header .ui-state-highlight {
    border: 1px solid #000000;
    background: #ff917f;
    color: #000000;
    z-index: 10003;
}

body .ui-datepicker td span,
body .ui-datepicker td a {
    display: block;
    padding: .2em;
    text-align: center;
    text-decoration: none;
    z-index: 10004;
}

/* Customize the delivery date input field */
.woocommerce .my-field-class {
    position: relative;
    z-index: 1;
}

.woocommerce .my-field-class input[type="text"] {
    padding-left: 45px;
    cursor: pointer;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

.woocommerce .my-field-class::before {
    content: url('https://flowerportal.in/wp-content/uploads/2024/05/calendar.png');
    position: absolute;
    left: 10px;
    top: 40%;
    transform: translateY(-50%);
    pointer-events: none;
    opacity: 0.6;
    z-index: 2;
}

.woocommerce .my-field-class input::placeholder {
    color: #aaa;
}

input[type=checkbox], input[type=radio] {
    display: inline;
    font-size: 5px;
}

.button, button, fieldset, input, select, textarea {
    margin-bottom: 1em;
}
