/* --- START OF FILE style.css --- */

/* Basic Reset & Body Font */
body {
    font-family: 'Open Sans', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: #333;
    line-height: 1.6;
}

/* Main Form Container */
#sd-appointment-form {
    max-width: 700px;
    margin: 30px auto; /* More vertical margin */
    padding: 30px; /* More padding */
    background: #ffffff; /* Clean white background */
    border: 1px solid #e0e0e0; /* Softer border */
    border-radius: 10px; /* Slightly more rounded corners */
    box-shadow: 0 4px 20px rgba(0,0,0,0.08); /* More prominent, softer shadow */
    position: relative; /* For popup overlay positioning if needed, though popup is body-appended */
}

/* Form Group Layout (Flexbox) */
.form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px; /* Increased bottom margin */
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
    gap: 10px; /* Gap between label and input */
}

.form-group label {
    flex-basis: 30%; /* Fixed width for labels */
    min-width: 120px; /* Minimum width for labels */
    text-align: right; /* Align label text to the right */
    font-weight: 600; /* Slightly bolder */
    color: #555;
    padding-right: 15px; /* Space between label and input */
    box-sizing: border-box; /* Include padding in width */
}

/* Input & Select Field Styling */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select {
    flex-grow: 1; /* Allows inputs to take remaining space */
    max-width: calc(70% - 10px); /* Max width considering label and gap */
    padding: 12px 15px; /* Generous padding */
    border: 1px solid #dcdcdc; /* Lighter border */
    border-radius: 6px; /* Rounded corners */
    background-color: #fcfdfe; /* Very light subtle background */
    font-size: 15px; /* Slightly larger font */
    color: #333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    box-sizing: border-box; /* Crucial for consistent sizing */
}

/* Custom Arrow for Select Fields */
.form-group select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px; /* Make space for custom arrow */
    cursor: pointer;
}

/* Hover and Focus Effect for all fields */
.form-group input:hover,
.form-group select:hover {
    border-color: #a0d9ff; /* Lighter blue for hover */
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #007bff; /* Primary blue */
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.25); /* Softer focus ring */
    background-color: #ffffff;
}

/* Disabled State for Select Options */
.form-group select option:disabled {
    color: #999;
    font-style: italic;
    background-color: #eee;
}

/* Date Picker specific styling (to make it align nicely) */
#pref_date {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    padding-right: 40px;
}

/* Day Name Display */
#pref_date_day_name {
    margin-left: 10px;
    font-weight: bold;
    color: #007bff; /* Match primary color */
    font-size: 0.9em;
}


/* Button Styling */
.form-group.submit-group {
    justify-content: center;
    margin-top: 30px;
}
.form-group button {
    width: 100%; /* Full width on smaller screens */
    max-width: 300px; /* Max width on larger screens */
    padding: 14px 25px; /* More padding */
    font-size: 17px; /* Larger font */
    color: white;
    background-color: #007bff; /* Primary blue */
    border: none;
    border-radius: 8px; /* More rounded */
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 123, 255, 0.3); /* Softer shadow */
    transition: all 0.2s ease-in-out;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.form-group button:hover {
    background-color: #0056b3; /* Darker blue */
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.4);
    transform: translateY(-2px); /* Slight lift */
}
.form-group button:active {
    background-color: #004085;
    box-shadow: 0 2px 8px rgba(0, 123, 255, 0.4);
    transform: translateY(1px); /* Press-down effect */
}
.form-group button:disabled {
    background-color: #cccccc;
    box-shadow: 0 4px #999999;
    cursor: not-allowed;
    transform: none;
}


/* Validation and Helper Styles */
.required {
    color: #dc3545; /* Red */
    margin-left: 3px;
}
.form-messages {
    padding: 15px 20px;
    margin-top: 25px;
    border-radius: 6px;
    text-align: center;
    font-weight: 500;
    font-size: 0.95em;
    display: none; /* Managed by JS */
    border-left: 5px solid; /* A nice visual indicator */
}
.form-messages.success-message {
    background-color: #d4edda;
    color: #155724;
    border-color: #28a745; /* Green */
}
.form-messages.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #dc3545; /* Red */
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .form-group {
        flex-direction: column;
        align-items: flex-start; /* Align items to the start in column layout */
    }
    .form-group label {
        flex-basis: 100%;
        text-align: left; /* Labels align left */
        margin-right: 0;
        margin-bottom: 8px; /* Space below label */
        padding-right: 0;
    }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group select {
        flex-basis: 100%; /* Take full width */
        max-width: 100%; /* Override max-width */
        width: 100%; /* Ensure full width */
    }
    .form-group button {
        width: 100%;
        max-width: none; /* Allow button to stretch */
    }
}

/* Confirmation Popup Styles */
#sd-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* Darker overlay */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999; /* Higher z-index to be on top of everything */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}
#sd-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}
#sd-popup-content {
    background: white;
    padding: 35px 40px; /* More padding */
    border-radius: 10px; /* Rounded corners */
    text-align: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2); /* More pronounced shadow */
    transform: translateY(-30px); /* Start higher for animation */
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Bouncy transition */
    max-width: 450px; /* Slightly wider */
    width: 90%;
    position: relative; /* For z-index context */
    z-index: 100001; /* Ensure content is above overlay */
}
#sd-popup-overlay.active #sd-popup-content {
    transform: translateY(0); /* Animate to center */
}
#sd-popup-content h3 {
    margin-top: 0;
    color: #28a745; /* Green success color */
    font-size: 2.2em; /* Larger heading */
    margin-bottom: 20px;
    font-weight: 700;
}
#sd-popup-content p {
    margin-bottom: 25px; /* More space below paragraphs */
    font-size: 1.15em; /* Slightly larger text */
    color: #555;
    line-height: 1.6;
}
#sd-popup-close {
    background: #007bff;
    color: white;
    border: none;
    padding: 12px 25px; /* More padding */
    border-radius: 6px;
    cursor: pointer;
    font-size: 1.1em; /* Larger font */
    transition: background 0.2s, transform 0.1s;
    margin-top: 20px;
    font-weight: 600;
}
#sd-popup-close:hover {
    background: #0056b3;
    transform: translateY(-1px);
}
#sd-popup-close:active {
    transform: translateY(1px);
}

/* jQuery UI Datepicker z-index to ensure it's above other elements but below popup */
.ui-datepicker {
    z-index: 999999 !important; /* One level below popup overlay */
    font-size: 14px; /* Adjust datepicker font size */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-radius: 6px;
    padding: 10px;
}

/* Style for datepicker header */
.ui-datepicker .ui-datepicker-header {
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px 4px 0 0;
    padding: 10px 0;
    margin-bottom: 5px;
}

/* Style for datepicker navigation buttons */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    top: 8px;
    cursor: pointer;
    padding: 5px;
    color: #fff;
}
.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Style for current day in datepicker */
.ui-datepicker .ui-state-highlight {
    background: #d4edda; /* Light green */
    color: #155724; /* Dark green */
    border-radius: 4px;
}

/* Style for selected day in datepicker */
.ui-datepicker .ui-state-active {
    background: #007bff;
    color: #fff;
    border-radius: 4px;
}

/* Style for hover day in datepicker */
.ui-datepicker .ui-state-hover {
    background: #e0e0e0;
    border: 1px solid #ccc;
    color: #333;
    border-radius: 4px;
}

/* Style for disabled dates in datepicker */
.ui-datepicker .ui-state-disabled span,
.ui-datepicker .ui-state-disabled {
    color: #a0a0a0 !important;
    background: #f0f0f0 !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

/* Admin page table styling */
.wp-list-table th, .wp-list-table td {
    padding: 10px 12px;
    vertical-align: middle;
}
.wp-list-table th {
    font-weight: bold;
    background-color: #f5f5f5;
}
.wp-list-table tbody tr:nth-child(odd) {
    background-color: #fcfcfc;
}
.wp-list-table tbody tr:hover {
    background-color: #f0f8ff; /* Light blue on hover */
}
.wp-list-table a {
    color: #007bff;
    text-decoration: none;
}
.wp-list-table a:hover {
    text-decoration: underline;
}

/* General admin notices */
.notice.notice-success {
    border-left-color: #28a745;
}
.form-table th {
    width: 250px;
}

/* --- END OF FILE style.css --- */