/* CF7 Google Calendar Frontend Styles - Compact Design */

/* Submit Button States */
.wpcf7-submit.disabled {
    background-color: #9ca3af !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
}

.wpcf7-submit.disabled:hover {
    background-color: #9ca3af !important;
    transform: none !important;
    box-shadow: none !important;
}

.cf7-calendar-preview {
    margin-top: 12px;
    border: 1px solid #e1e5e9;
    border-radius: 10px;
    padding: 12px;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    min-height: 120px;
    position: relative;
    z-index: 1000;
    overflow: hidden;
}

.calendar-month-section {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
}

.calendar-layout {
    display: flex !important;
    flex-direction: row;
    gap: 0;
    margin-top: 0;
}

.calendar-left {
    flex: 1;
    min-width: 240px;
    background: #fafbfc;
    border-right: 1px solid #e1e5e9;
}

.calendar-right {
    flex: 1;
    min-width: 240px;
    background: #ffffff;
}

.calendar-grid {
    border: none;
    border-radius: 0;
    overflow: hidden;
    margin-bottom: 0;
    background: transparent;
    display: block !important;
    visibility: visible !important;
}



/* Calendar Navigation */
.calendar-nav {
    display: flex !important;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #ffffff;
    border-bottom: 1px solid #e1e5e9;
    visibility: visible !important;
    opacity: 1 !important;
}

.calendar-nav button {
    background: transparent;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.calendar-nav button:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-1px);
}

.current-month {
    font-weight: 700;
    font-size: 16px;
    color: #111827;
}

/* Calendar Days Headers */
.calendar-days {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    background: #f9fafb;
    visibility: visible !important;
    opacity: 1 !important;
}

.day-header {
    padding: 8px 4px;
    text-align: center;
    font-weight: 600;
    color: #6b7280;
    border-right: 1px solid #e5e7eb;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    visibility: visible !important;
    opacity: 1 !important;
}

.day-header:last-child {
    border-right: none;
}

/* Date Number */
.date-number {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 2px;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Calendar Dates Grid */
.calendar-dates {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr);
    visibility: visible !important;
    opacity: 1 !important;
}

/* Calendar Date Styling */
.calendar-date {
    padding: 8px 4px;
    text-align: center;
    border-right: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 12px;
    font-weight: 500;
    min-height: 45px;
    display: flex !important;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    background: #ffffff;
    visibility: visible !important;
    opacity: 1 !important;
}

.calendar-date:hover {
    background: #f3f4f6;
    transform: none;
}

/* CRITICAL: Selected date styling (Blue color) */
.calendar-date.selected {
    background: #3b82f6 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}

.calendar-date.selected .date-number {
    color: white !important;
}

/* CRITICAL: Today's date styling (Green color) */
.calendar-date.today {
    background: #10b981 !important;
    color: white !important;
    font-weight: 600 !important;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3) !important;
}

.calendar-date.today .date-number {
    color: white !important;
}

.calendar-date.other-month {
    color: #9ca3af;
    background: #fafbfc;
}

.calendar-date.disabled-date {
    color: #d1d5db !important;
    background: #f9fafb !important;
    cursor: not-allowed !important;
    opacity: 0.4 !important;
    position: relative;
}

.calendar-date.disabled-date:hover {
    background: #f9fafb !important;
    transform: none !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
}

.calendar-date.disabled-date .date-number {
    text-decoration: line-through;
    opacity: 0.6;
}

/* Weekend disabled dates - minimal styling to maintain original design */
.calendar-date.disabled-weekend {
    opacity: 0.6;
    cursor: not-allowed;
}

.weekend-disabled-icon {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 12px;
    color: #ff6b6b;
    font-weight: bold;
}

/* Calendar Info Section */
.calendar-info-section {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    visibility: visible !important;
    opacity: 1 !important;
}

.calendar-details p {
    margin: 8px 0;
    font-size: 14px;
    color: #495057;
}

.calendar-details strong {
    color: #007cba;
}

/* Time Slots Section */
.time-slots-section {
    margin-top: 0;
    padding: 16px;
    background: #ffffff;
    border-radius: 0;
    border: none;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #007cba #e9ecef;
}

.time-slots-section::-webkit-scrollbar {
    width: 8px;
}

.time-slots-section::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 4px;
}

.time-slots-section::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 4px;
}

.time-slots-section::-webkit-scrollbar-thumb:hover {
    background: #005a8b;
}

.time-slots-section h5 {
    margin-top: 0;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.time-slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin: 12px 0;
    max-height: 350px;
    overflow-y: auto;
    padding-right: 8px;
    scrollbar-width: thin;
    scrollbar-color: #007cba #e9ecef;
}

.time-slots-grid::-webkit-scrollbar {
    width: 6px;
}

.time-slots-grid::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 3px;
}

.time-slots-grid::-webkit-scrollbar-thumb {
    background: #007cba;
    border-radius: 3px;
}

.time-slots-grid::-webkit-scrollbar-thumb:hover {
    background: #005a8b;
}

.time-slot {
    padding: 8px 6px;
    border-radius: 6px;
    text-align: center;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #ffffff;
    margin-bottom: 6px;
}

.time-slot:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    border-color: #d1d5db;
}

.time-slot.available {
    background: #ffffff;
    border-color: #10b981;
    color: #065f46;
}

.time-slot.available:hover {
    background: #ecfdf5;
    border-color: #059669;
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.time-slot.unavailable {
    background: #fef2f2;
    border-color: #f87171;
    color: #991b1b;
    opacity: 0.7;
}

.time-slot.unavailable:hover {
    background: #fef2f2;
    border-color: #ef4444;
    opacity: 0.8;
}

.time-slot-time {
    font-weight: 700;
    font-size: 11px;
    margin-bottom: 4px;
    color: #111827;
}

.time-slot-status {
    font-size: 10px;
    margin-bottom: 6px;
    font-weight: 500;
}

.time-slot-action {
    font-size: 0.85em;
    color: #888;
    margin-top: 3px;
    font-style: italic;
}

.time-slots-summary {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 8px;
    background: #f8fafc;
    border-radius: 6px;
    font-size: 11px;
    border: 1px solid #e2e8f0;
}

.available-count {
    color: #065f46;
    font-weight: 600;
    background: #ecfdf5;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #a7f3d0;
    font-size: 10px;
}

.unavailable-count {
    color: #991b1b;
    font-weight: 600;
    background: #fef2f2;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #fecaca;
    font-size: 10px;
}

.book-slot-btn {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: all 0.2s ease;
    width: 100%;
}

.book-slot-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.time-slot.available {
    border-left: 4px solid #4caf50;
    background: #f8fff8;
}

.time-slot.unavailable {
    border-left: 4px solid #f44336;
    background: #fff8f8;
}

.timezone-indicator {
    text-align: center;
    margin-top: 12px;
    padding: 8px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 11px;
    color: #6c757d;
    font-weight: 500;
}

.no-available-slots {
    text-align: center;
    padding: 20px 12px;
    color: #6c757d;
}

.no-available-slots p {
    margin: 4px 0;
    font-size: 12px;
}

/* Loading States */
.calendar-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
    font-size: 16px;
}

.time-slots-loading {
    text-align: center;
    padding: 20px;
    color: #6c757d;
    font-style: italic;
}

/* Error States */
.calendar-error {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
    text-align: center;
    margin: 20px 0;
}

/* Country Indicator */
.country-indicator {
    background: #eff6ff;
    color: #1e40af;
    padding: 8px 16px;
    border-radius: 8px;
    margin: 8px 0;
    font-size: 12px;
    font-weight: 600;
    border: 1px solid #bfdbfe;
    position: relative;
    display: inline-block;
}

.country-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    max-width: 200px;
    z-index: 1000;
    margin-top: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    display: none;
    top: 100%;
    left: 0;
}

.country-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #333;
}

/* Success Message */
.calendar-success-note {
    background: #d1ecf1;
    color: #0c5460;
    padding: 15px 20px;
    border-radius: 6px;
    margin-top: 15px;
    border: 1px solid #bee5eb;
    font-weight: 500;
    font-size: 14px;
}



/* Loading Spinner for Navigation Buttons */
.loading-spinner {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s ease-in-out infinite;
    margin-right: 5px;
}

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

.calendar-nav button.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Country Change Loader */
.country-change-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    margin: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    min-height: 80px;
}

.country-change-loader .loader-spinner {
    width: 24px;
    height: 24px;
    border: 2px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

.country-change-loader .loader-text {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cf7-calendar-preview {
        padding: 8px;
        margin-top: 12px;
        border-radius: 8px;
    }
    
    .calendar-nav {
        padding: 8px 12px;
        flex-direction: column;
        gap: 6px;
    }
    
    .calendar-left,
    .calendar-right {
        min-width: auto;
    }
    
    .calendar-layout {
        flex-direction: column;
    }
    
    .time-slots-section {
        padding: 12px;
    }
    
    .calendar-date {
        padding: 6px 3px;
        min-height: 35px;
        font-size: 11px;
    }
    
    .time-slots-grid {
        grid-template-columns: 1fr;
    }
    
    .time-slot {
        padding: 10px 8px;
    }
    
    .country-change-loader {
        padding: 8px;
        flex-direction: column;
        gap: 6px;
    }
    
    .country-change-loader .loader-text {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .cf7-calendar-preview {
        padding: 6px;
    }
    
    .calendar-date {
        padding: 4px 2px;
        min-height: 30px;
        font-size: 10px;
    }
    
    .day-header {
        padding: 4px 3px;
        font-size: 10px;
    }
    
    .time-slot {
        padding: 6px 4px;
    }
    
    .country-change-loader {
        padding: 6px;
    }
    
    .country-change-loader .loader-text {
        font-size: 11px;
    }
}

/* Event Meet Indicators */
.event-meet-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: bold;
    margin-left: 8px;
}

.event-meet-icon {
    font-size: 12px;
    margin-left: 4px;
    color: #28a745;
}

/* Enhanced Event Display */
.date-event {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
    padding: 4px 8px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 6px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.event-dot {
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.event-time {
    font-size: 11px;
    color: #1e40af;
    font-weight: 600;
}

/* Upcoming Events Summary - Hidden for compact design */
.upcoming-events-summary {
    display: none !important;
}

@media (max-width: 768px) {
    .calendar-layout {
        flex-direction: column;
        gap: 15px;
    }
    
    .calendar-left,
    .calendar-right {
        min-width: auto;
    }
    
    .calendar-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .calendar-date {
        padding: 10px 5px;
        min-height: 50px;
        font-size: 13px;
    }
    
    .time-slots-grid {
        grid-template-columns: 1fr;
    }
    
    .time-slot {
        padding: 15px 10px;
    }
}

/* Loading state for time slots */
.loading-slots {
    text-align: center;
    padding: 40px 20px;
    color: #666;
    font-size: 16px;
}

.loading-slots::before {
    content: "🔄";
    display: block;
    font-size: 24px;
    margin-bottom: 10px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* No slots available message */
.no-slots-available {
    text-align: center;
    padding: 30px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e9ecef;
}

.no-slots-available p {
    margin: 10px 0;
    color: #6c757d;
}

.no-slots-available p:first-child {
    color: #dc3545;
    font-weight: bold;
}

/* Booked slots information display */
.booked-slots-info {
    margin-top: 20px;
    padding: 15px;
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
}

.booked-slots-info h6 {
    margin: 0 0 10px 0;
    color: #856404;
    font-size: 14px;
    font-weight: 600;
}

.booked-slots-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.booked-slot-badge {
    background: #f8d7da;
    color: #721c24;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid #f5c6cb;
}

/* Calendar account information display */
.calendar-account-info {
    margin: 10px 0;
    padding: 8px 12px;
    background: #e3f2fd;
    border: 1px solid #2196f3;
    border-radius: 6px;
    font-size: 12px;
    color: #0d47a1;
    font-weight: 500;
    text-align: center;
}

/* Selected time slot highlighting */
.time-slot.selected {
    background-color: #e3f2fd !important;
    border: 2px solid #2196f3 !important;
    box-shadow: 0 2px 8px rgba(33, 150, 243, 0.3) !important;
    transform: scale(1.02) !important;
    transition: all 0.2s ease !important;
}

.time-slot.selected .time-slot-time {
    color: #1976d2 !important;
    font-weight: bold !important;
}

.time-slot.selected .time-slot-status {
    color: #1976d2 !important;
    font-weight: bold !important;
}

.time-slot.selected .book-slot-btn {
    background-color: #1976d2 !important;
    color: white !important;
    font-weight: bold !important;
}
