/**
 * Public styles for the GeoVee Client plugin
 */

/* Container */
.geovee-container {
    max-width: 600px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Search Form */
.geovee-search-form {
    margin-bottom: 20px;
}

.geovee-input-group {
    display: flex;
    gap: 10px;
}

.geovee-address-input {
    flex-grow: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.geovee-search-button {
    padding: 10px 20px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.geovee-search-button:hover {
    background-color: #005a87;
}

/* Map Container - Modern Google Maps Style */
.geovee-map-container {
    margin-bottom: 20px;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}

.geovee-map {
    height: 200px; /* Slightly larger for better visibility */
    width: 100%;
    border-radius: 12px;
}

/* Results Container */
.geovee-results-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
}

.geovee-results-header {
    background-color: #f9f9f9;
    padding: 15px;
    border-bottom: 1px solid #ddd;
}

.geovee-results-title {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.geovee-results-content {
    padding: 15px;
}

.geovee-result-item {
    margin-bottom: 15px;
    padding: 15px;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.geovee-result-item:hover {
    background-color: #f7fafc;
    cursor: pointer;
}

.geovee-result-item:last-child {
    border-bottom: none;
}

.geovee-results-separator {
    margin: 20px 0;
    padding: 10px 0;
    border-top: 2px solid #cbd5e0;
    border-bottom: 2px solid #cbd5e0;
    text-align: center;
    font-weight: 600;
    color: #4a5568;
    background: #f7fafc;
}

.geovee-list-footer {
    padding: 15px;
    text-align: center;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
}

.geovee-next-button {
    padding: 10px 30px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.geovee-next-button:hover {
    background-color: #005a87;
}

.geovee-next-button:disabled {
    background-color: #cbd5e0;
    cursor: not-allowed;
}

.geovee-result-date {
    font-weight: bold;
    font-size: 16px;
    margin-bottom: 5px;
}

.geovee-result-time {
    font-size: 16px;
    margin-bottom: 5px;
}

.geovee-result-offer {
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.geovee-result-distance {
    font-size: 14px;
    color: #666;
}

.geovee-results-footer {
    background-color: #f9f9f9;
    padding: 15px;
    border-top: 1px solid #ddd;
    text-align: right;
}

.geovee-next-button {
    padding: 8px 15px;
    background-color: #0073aa;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.geovee-next-button:hover {
    background-color: #005a87;
}

/* Loading Indicator */
.geovee-loading {
    text-align: center;
    padding: 20px;
}

.geovee-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(0, 115, 170, 0.2);
    border-radius: 50%;
    border-top-color: #0073aa;
    animation: geovee-spin 1s ease-in-out infinite;
    margin-bottom: 10px;
}

.geovee-loading-text {
    color: #666;
}

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

/* Error Message */
.geovee-error {
    padding: 15px;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin-bottom: 20px;
}

/* Font Size Classes */
.text-sm {
    font-size: 0.875rem;
}

.text-base {
    font-size: 1rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-xl {
    font-size: 1.25rem;
}

/* View Toggle */
.geovee-view-toggle {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.geovee-view-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 15px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.geovee-view-btn:hover {
    background: #f9f9f9;
    border-color: #0073aa;
}

.geovee-view-btn.active {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.geovee-view-btn .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Calendar View */
.geovee-calendar-view {
    padding: 20px;
}

.geovee-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.geovee-calendar-prev,
.geovee-calendar-next {
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.geovee-calendar-prev:hover,
.geovee-calendar-next:hover {
    background: #f9f9f9;
    border-color: #0073aa;
}

.geovee-calendar-month {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.geovee-calendar-grid {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.geovee-calendar-days-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8fafc;
    border-bottom: 2px solid #e2e8f0;
}

.geovee-calendar-day-name {
    padding: 12px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
    color: #4a5568;
}

.geovee-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #e2e8f0;
}

.geovee-calendar-day {
    background: white;
    padding: 8px;
    min-height: 80px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    aspect-ratio: 1;
}

/* Removed general hover rule that was overriding specific classes */

.geovee-calendar-day.has-availability {
    background: #e6f7ff;
    cursor: pointer;
}

.geovee-calendar-day.has-availability:hover {
    background: #bae7ff;
}

.geovee-calendar-day.has-offers {
    background: #4ade80 !important;
    color: white !important;
}

.geovee-calendar-day.has-offers:hover {
    background: #22c55e !important;
}

/* Remove the overly broad rule that made everything green */

.geovee-calendar-day-offers {
    font-size: 10px;
    color: white;
    margin-top: 2px;
}

.geovee-calendar-day.other-month {
    background: #f9fafb;
    color: #cbd5e0;
}

/* Default hover for calendar days without specific classes */
.geovee-calendar-day:not(.has-availability):not(.has-offers):hover {
    background: #f7fafc;
}

.geovee-calendar-day-number {
    font-weight: 600;
    margin-bottom: 5px;
}

.geovee-calendar-day-slots {
    font-size: 11px;
    color: #0073aa;
    font-weight: 500;
}

/* Day Detail View */
.geovee-calendar-day-detail {
    padding: 20px;
}

.geovee-day-detail-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e2e8f0;
}

.geovee-back-to-calendar {
    display: flex;
    align-items: center;
    gap: 5px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
}

.geovee-back-to-calendar:hover {
    background: #f9f9f9;
    border-color: #0073aa;
}

.geovee-day-detail-title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.geovee-day-detail-slots {
    display: grid;
    gap: 10px;
}

.geovee-time-slot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.geovee-time-slot:hover {
    background: #e6f7ff;
    border-color: #0073aa;
}

.geovee-time-slot.selected {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.geovee-time-slot-time {
    font-weight: 600;
    font-size: 16px;
}

.geovee-time-slot-offer {
    font-size: 14px;
    color: #0073aa;
}

.geovee-time-slot.selected .geovee-time-slot-offer {
    color: white;
}

/* Schedule Button */
.geovee-schedule-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #10b981;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: background-color 0.3s;
    margin-right: 10px;
}

.geovee-schedule-button:hover {
    background-color: #059669;
}

.geovee-schedule-button .dashicons {
    font-size: 18px;
    width: 18px;
    height: 18px;
}

/* Booking Modal */
.geovee-booking-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.geovee-booking-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
}

.geovee-booking-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.geovee-booking-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.geovee-booking-modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
}

.geovee-booking-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #718096;
    line-height: 1;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s;
}

.geovee-booking-modal-close:hover {
    background: #f7fafc;
    color: #2d3748;
}

.geovee-booking-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.geovee-booking-selected-slot {
    background: #e6f7ff;
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    border: 1px solid #91d5ff;
}

.geovee-booking-slot-date {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 5px;
}

.geovee-booking-slot-time {
    font-size: 14px;
    color: #0073aa;
}

.geovee-booking-field {
    margin-bottom: 20px;
}

.geovee-booking-field-image {
    margin-bottom: 10px;
}

.geovee-booking-field-image img {
    max-width: 100px;
    height: auto;
    border-radius: 4px;
}

.geovee-booking-field-label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.geovee-required {
    color: #e53e3e;
}

.geovee-booking-field-input {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.2s;
    background: #f7fafc;
}

.geovee-booking-field-input:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.geovee-booking-field-input:not(:disabled) {
    background: white;
    cursor: text;
}

.geovee-booking-field-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.geovee-booking-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e2e8f0;
}

.geovee-booking-cancel,
.geovee-booking-submit {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.geovee-booking-cancel {
    background: white;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.geovee-booking-cancel:hover {
    background: #f7fafc;
}

.geovee-booking-submit {
    background: #0073aa;
    color: white;
}

.geovee-booking-submit:hover {
    background: #005a87;
}

/* Responsive Adjustments */
@media screen and (max-width: 600px) {
    .geovee-input-group {
        flex-direction: column;
    }
    
    .geovee-address-input,
    .geovee-search-button {
        width: 100%;
    }
    
    .geovee-search-button {
        margin-top: 10px;
    }
    
    .geovee-view-toggle {
        flex-direction: column;
    }
    
    .geovee-view-btn {
        width: 100%;
        justify-content: center;
    }
    
    .geovee-calendar-day {
        min-height: 60px;
        padding: 8px;
    }
    
    .geovee-calendar-day-number {
        font-size: 12px;
    }
    
    .geovee-calendar-day-slots {
        font-size: 10px;
    }
    
    .geovee-booking-modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    .geovee-results-footer {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .geovee-schedule-button,
    .geovee-next-button {
        width: 100%;
        margin: 0;
    }
}