/* ========================================
   Doctor Booking Widget Styles
   ======================================== */

/* Doctors Grid */
.dbw-doctors-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Doctor Card - Clean white design matching screenshot */
.dbw-doctor-card {
    background: #ffffff;
    border: 2px solid #e8f5e9;
    border-radius: 16px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    /* No hover animation */
}

/* Doctor Image Wrapper */
.dbw-doctor-image-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    overflow: hidden;
    background: #f5f5f5;
}

.dbw-doctor-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Doctor Logo/Badge - Top Left Corner */
.dbw-doctor-logo {
    position: absolute;
    top: 12px;
    left: 12px;
    width: 60px;
    height: 60px;
    background: #8bc34a;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
}

.dbw-doctor-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Doctor Info */
.dbw-doctor-info {
    padding: 20px 20px 15px;
    flex: 1;
}

.dbw-doctor-name {
    font-size: 18px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 8px;
    line-height: 1.3;
}

/* Specialty/Title in Green - Matching screenshot */
.dbw-doctor-title {
    font-size: 14px;
    font-weight: 500;
    color: #8bc34a;
    margin: 0;
    line-height: 1.4;
}

/* Doctor Action */
.dbw-doctor-action {
    padding: 0 20px 20px;
}

/* Booking Button - Orange rounded button matching screenshot */
.dbw-booking-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #ff8c42;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.dbw-booking-btn:hover {
    background: #e67e22;
    color: #ffffff;
}

/* ========================================
   Popup Styles - Updated Design
   ======================================== */

.dbw-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.dbw-popup-overlay.active {
    opacity: 1;
    visibility: visible;
}

.dbw-popup-wrapper {
    position: relative;
    width: 600px;
    max-height: 90vh;
    /* No scrollbar */
    overflow: visible;
}

.dbw-popup-content {
    background: #EDF7D9;
    border-radius: 30px;
    padding: 50px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    /* No overflow to prevent scrollbar */
    overflow: visible;
}

.dbw-popup-overlay.active .dbw-popup-content {
    transform: scale(1);
}

/* Popup Close Icon - Just SVG, no button styles */
.dbw-popup-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 18px;
    height: 18px;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    display: block;
    padding: 0;
    z-index: 10;
    transition: opacity 0.2s ease;
    outline: none !important;
    box-shadow: none !important;
    appearance: none !important;
}

.dbw-popup-close svg {
    width: 18px;
    height: 18px;
    display: block;
}

.dbw-popup-close:hover {
    opacity: 0.7;
    background: transparent !important;
}

/* Popup Header */
.dbw-popup-header {
    padding: 0 0 15px;
    text-align: center;
}

.dbw-popup-title {
    color: #000;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-style: normal;
    font-weight: 600;
    line-height: normal;
    margin: 0 0 10px;
}

.dbw-popup-subtitle {
    color: #000;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-style: normal;
    font-weight: 400;
    line-height: normal;
    margin: 0;
}

/* Popup Body - No padding as content has its own */
.dbw-popup-body {
    padding: 0;
}

/* Doctor Info in Popup - White box style */
.dbw-popup-doctor-info {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 15px;
    margin-bottom: 25px;
}

.dbw-popup-doctor-image {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.dbw-popup-doctor-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dbw-popup-doctor-details {
    flex: 1;
}

.dbw-popup-doctor-name {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 3px;
}

.dbw-popup-doctor-title {
    font-size: 13px;
    color: #7f8c8d;
    margin: 0;
}

/* Form Styles */
.dbw-booking-form {
    display: block;
}

.dbw-form-group {
    margin-bottom: 20px;
}

.dbw-form-submit {
    margin-top: 25px;
    margin-bottom: 0;
}

.dbw-form-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 8px;
}

.dbw-form-input,
.dbw-form-textarea {
    width: 100%;
    padding: 12px 15px;
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.dbw-form-input:focus,
.dbw-form-textarea:focus {
    outline: none;
    border-color: #ff8c42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

.dbw-form-input::placeholder,
.dbw-form-textarea::placeholder {
    color: #bbb;
}

.dbw-form-textarea {
    resize: vertical;
    min-height: 80px;
    height: 90px;
}

/* Date Picker Input */
.dbw-date-picker {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 45px;
}

/* Submit Button */
.dbw-submit-btn {
    display: block;
    width: 100%;
    padding: 15px 40px;
    background: #ff8c42;
    color: #ffffff;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 140, 66, 0.3);
}

.dbw-submit-btn:hover {
    background: #e67e22;
    box-shadow: 0 6px 20px rgba(255, 140, 66, 0.4);
}

.dbw-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loading State */
.dbw-submit-btn.loading {
    position: relative;
    color: transparent;
}

.dbw-submit-btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: dbw-spin 1s linear infinite;
}

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

/* Success Message */
.dbw-success-message {
    text-align: center;
    padding: 40px 20px;
}

.dbw-success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    color: #ffffff;
    margin: 0 auto 20px;
    animation: dbw-scale-in 0.5s ease;
}

@keyframes dbw-scale-in {
    0% {
        transform: scale(0);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.dbw-success-message h4 {
    font-size: 24px;
    color: #2c3e50;
    margin: 0 0 10px;
}

.dbw-success-message p {
    font-size: 16px;
    color: #7f8c8d;
    margin: 0;
}

/* Error Message */
.dbw-error-message {
    background: #fee;
    border: 1px solid #fcc;
    border-radius: 8px;
    padding: 12px 15px;
    margin-bottom: 20px;
    color: #c33;
    font-size: 14px;
}

/* Form Validation */
.dbw-form-input.error {
    border-color: #e74c3c;
    background-color: #fdf2f2;
}

.dbw-form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.dbw-field-error {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 5px;
}

/* Flatpickr Customization */
.flatpickr-calendar {
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
}

.flatpickr-months {
    background: #ff8c42;
    border-radius: 12px 12px 0 0;
}

.flatpickr-month {
    color: #ffffff;
}

.flatpickr-current-month input.cur-year {
    color: #ffffff;
}

.flatpickr-current-month .numInputWrapper span.arrowUp,
.flatpickr-current-month .numInputWrapper span.arrowDown {
    border-color: rgba(255, 255, 255, 0.5);
}

.flatpickr-prev-month,
.flatpickr-next-month {
    color: #ffffff !important;
    fill: #ffffff !important;
}

.flatpickr-prev-month:hover,
.flatpickr-next-month:hover {
    color: rgba(255, 255, 255, 0.8) !important;
    fill: rgba(255, 255, 255, 0.8) !important;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover,
.flatpickr-day.selected:focus {
    background: #ff8c42;
    border-color: #ff8c42;
}

.flatpickr-day.today {
    border-color: #ff8c42;
}

.flatpickr-day:hover {
    background: rgba(255, 140, 66, 0.1);
}

/* ========================================
   Custom Form Fields Styles
   ======================================== */

.dbw-custom-field {
    position: relative;
}

.dbw-required {
    color: #e74c3c;
    margin-left: 3px;
}

/* Radio Buttons */
.dbw-radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.dbw-radio-label,
.dbw-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.dbw-radio-label input[type="radio"],
.dbw-checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #ff8c42;
    cursor: pointer;
}

/* Select Dropdown */
.dbw-form-input select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    padding-right: 40px;
}

/* Custom field focus */
.dbw-custom-field .dbw-form-input:focus {
    border-color: #ff8c42;
    box-shadow: 0 0 0 3px rgba(255, 140, 66, 0.1);
}

/* Textarea border radius */
textarea.dbw-form-textarea.dbw-form-input {
    border-radius: 20px !important;
}

/* ========================================
   Mobile Slider Styles (Slick)
   ======================================== */

/* Slider container */
.dbw-doctors-grid.slick-initialized {
    display: block !important;
    grid-template-columns: none !important;
}

/* Hide default grid on mobile when slider is active */
@media (max-width: 768px) {
    .dbw-doctors-grid.slick-initialized {
        display: block;
    }
    
    .dbw-doctors-grid.slick-initialized .dbw-doctor-card {
        margin: 0;
    }
}

/* Slider Arrows */
.dbw-slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    padding: 0 !important;
    transition: all 0.3s ease;
    border: 0 !important;
    background: none !important;
}
.dbw-slider-arrow svg {
    width: 40px;
    height: 40px;
}

.dbw-slider-arrow i {
    font-size: 16px;
    color: #8ACB00;
    transition: color 0.3s ease;
}

.dbw-slider-prev {
    left: -10px;
}

.dbw-slider-next {
    right: -10px;
}

/* Bottom Position Arrows */
.dbw-doctors-grid.dbw-arrows-bottom .dbw-slider-arrow {
    top: auto;
    bottom: -50px;
    transform: none;
}

.dbw-doctors-grid.dbw-arrows-bottom .dbw-slider-prev {
    left: calc(50% - 50px);
}

.dbw-doctors-grid.dbw-arrows-bottom .dbw-slider-next {
    right: calc(50% - 50px);
}

.dbw-doctors-grid.dbw-arrows-bottom {
    padding-bottom: 60px;
}

/* Slick dots styling */
.dbw-doctors-grid .slick-dots {
    bottom: -30px;
}

.dbw-doctors-grid .slick-dots li button:before {
    color: #8ACB00;
    font-size: 12px;
}

.dbw-doctors-grid .slick-dots li.slick-active button:before {
    color: #8ACB00;
    opacity: 1;
}

/* ========================================
   Responsive Styles
   ======================================== */

@media (max-width: 1024px) {
    .dbw-doctors-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .dbw-doctor-image-wrapper {
        height: 250px;
    }
}

@media (max-width: 768px) {
    .dbw-doctors-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .dbw-doctor-image-wrapper {
        height: 300px;
    }
    
    .dbw-popup-wrapper {
        max-width: 100%;
    }
    
    .dbw-popup-content {
        border-radius: 20px;
        padding: 30px;
    }
    
    .dbw-popup-title {
        font-size: 22px;
    }
    
    .dbw-popup-header {
        padding: 0 0 20px;
    }
}

@media (max-width: 480px) {
    .dbw-doctor-image-wrapper {
        height: 250px;
    }
    
    .dbw-doctor-logo {
        width: 50px;
        height: 50px;
        padding: 6px;
    }
    
    .dbw-doctor-info {
        padding: 15px 15px 10px;
    }
    
    .dbw-doctor-action {
        padding: 0 15px 15px;
    }
    
    .dbw-booking-btn {
        padding: 10px 25px;
        font-size: 13px;
    }
    
    .dbw-popup-content {
        padding: 25px 20px;
        border-radius: 16px;
    }
    
    .dbw-popup-title {
        font-size: 20px;
    }
    
    .dbw-popup-subtitle {
        font-size: 14px;
    }
}

/* ========================================
   Animation Keyframes
   ======================================== */

@keyframes dbw-fade-in {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes dbw-slide-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prevent body scroll when popup is open */
body.dbw-popup-open {
    overflow: hidden;
}
