/* Two Pals Tutoring & Co Custom Styles */

/* Accessibility helpers */
.sr-only { position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }
.sr-only-focusable:active, .sr-only-focusable:focus { position:static; width:auto; height:auto; margin:0; overflow:visible; clip:auto; white-space:normal; }

/* AI Assistant Enhancements */
.ai-assistant-panel {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-content-card {
    transition: all 0.2s ease-in-out;
}

.ai-content-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.ai-loading-spinner {
    animation: spin 1s linear infinite;
}

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

.ai-generated-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
}

.ai-generated-content h1, .ai-generated-content h2, .ai-generated-content h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
}

.ai-suggestion-item {
    transition: all 0.2s ease-in-out;
    cursor: pointer;
}

.ai-suggestion-item:hover {
    transform: scale(1.02);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-notification {
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.ai-status-indicator {
    position: relative;
}

.ai-status-indicator::after {
    content: '';
    position: absolute;
    top: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.ai-status-indicator.processing::after {
    background: #f59e0b;
}

.ai-status-indicator.error::after {
    background: #ef4444;
}

/* Blog content enhancements */
.blog-content-preview {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #cbd5e0 transparent;
}

.blog-content-preview::-webkit-scrollbar {
    width: 6px;
}

.blog-content-preview::-webkit-scrollbar-track {
    background: transparent;
}

.blog-content-preview::-webkit-scrollbar-thumb {
    background-color: #cbd5e0;
    border-radius: 3px;
}

.word-count-display {
    font-variant-numeric: tabular-nums;
}

/* AI Panel Responsive Design */
@media (max-width: 1280px) {
    #ai-assistant-panel {
        position: fixed;
        top: 0;
        right: 0;
        height: 100vh;
        z-index: 60;
        box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
    }
}

@media (max-width: 768px) {
    #ai-assistant-panel {
        width: 100vw;
        max-width: 100vw;
    }
    
    #blog-post-modal .flex {
        flex-direction: column;
    }
    
    #blog-post-modal .flex-1 {
        order: 2;
    }
    
    #ai-assistant-panel {
        order: 1;
        width: 100%;
        max-height: 40vh;
        position: relative;
        height: auto;
    }
}

/* Global Font Settings */
* {
    font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, .heading {
    font-family: 'Outfit', sans-serif;
}

/* Font utility fallbacks (in case Tailwind class not generated) */
.font-body { font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.font-brand { font-family: 'Outfit', sans-serif; }
.font-sans { font-family: 'Inter', 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }

/* Enhanced Logo Animations */
@keyframes logoGlow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    }
    50% {
        box-shadow: 0 0 30px rgba(59, 130, 246, 0.5), 0 0 40px rgba(16, 185, 129, 0.3);
    }
}

@keyframes sparkle {
    0%, 100% {
        opacity: 0.7;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes textShimmer {
    0% {
        background-position: -200% center;
    }
    100% {
        background-position: 200% center;
    }
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-2px);
    }
}

/* Apply animations to logo elements */
.logo-container:hover {
    animation: logoGlow 2s ease-in-out infinite;
}

.logo-sparkle {
    animation: sparkle 2s ease-in-out infinite;
}

.logo-text {
    background-size: 200% auto;
    animation: logoFloat 3s ease-in-out infinite;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transform-origin: center;
}

.logo-text:hover {
    animation: logoFloat 3s ease-in-out infinite, textShimmer 2s linear infinite;
    letter-spacing: 0.01em;
    transform: scale(1.02);
}

/* Smooth Tab Transition Animations */
@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutToLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(-100%);
    }
}

@keyframes slideOutToRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes fadeOutScale {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.95) translateY(-10px);
    }
}

/* Tab content containers */
.tab-content {
    animation: fadeInScale 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.tab-content-exit {
    animation: fadeOutScale 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-right {
    animation: slideInFromRight 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-in-left {
    animation: slideInFromLeft 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-out-left {
    animation: slideOutToLeft 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.slide-out-right {
    animation: slideOutToRight 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Tab transition container */
.tab-container {
    position: relative;
    overflow: hidden;
}

.tab-section {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Additional smooth transitions for tabs */
.tab-transition-container {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab button hover and active states with smooth transitions */
.tab-button {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.tab-button:hover::before {
    left: 100%;
}

/* Enhanced gradient animations */
@keyframes gradient-x {
    0%, 100% {
        background-size: 200% 200%;
        background-position: left center;
    }
    50% {
        background-size: 200% 200%;
        background-position: right center;
    }
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(93, 92, 222, 0.3); }
    50% { box-shadow: 0 0 30px rgba(93, 92, 222, 0.6); }
}

/* Modern card hover effects */
.card-hover-effect {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover-effect:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Glassmorphism effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.dark .glass-effect {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Enhanced button styles */
.btn-gradient {
    background: linear-gradient(135deg, #5D5CDE 0%, #7C3AED 100%);
    position: relative;
    overflow: hidden;
}

.btn-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-gradient:hover::before {
    left: 100%;
}

/* Enhanced loading animation */
.loader-modern {
    width: 60px;
    height: 60px;
    border: 4px solid transparent;
    border-top: 4px solid #5D5CDE;
    border-radius: 50%;
    animation: spin-modern 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    position: relative;
}

.loader-modern::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    border: 2px solid transparent;
    border-top: 2px solid #7C3AED;
    border-radius: 50%;
    animation: spin-modern 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite reverse;
}

@keyframes spin-modern {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mobile menu animations */
.mobile-menu-enter {
    animation: slideDown 0.3s ease-out;
}

.mobile-menu-exit {
    animation: slideUp 0.3s ease-in;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

/* Enhanced form styling */
.form-input-modern {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.form-input-modern:focus {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(93, 92, 222, 0.25);
}

/* Tab switching animation */
.tab-content {
    animation: fadeInUp 0.4s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* User type selection enhancement */
.user-type-option {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.user-type-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s;
}

.user-type-option:hover::before {
    left: 100%;
}

.user-type-option.selected {
    transform: scale(1.05);
    box-shadow: 0 8px 25px -5px rgba(93, 92, 222, 0.4);
}

/* Dashboard enhancements */
.dashboard-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(10px);
}

.dark .dashboard-card {
    background: linear-gradient(145deg, rgba(0,0,0,0.2), rgba(0,0,0,0.1));
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Stats animation */
.stat-number {
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Enhanced calendar styling */
/* Tutor Cards (Subdued Theme) */
.tutor-card {
    background: linear-gradient(145deg,#f3f4f6,#eef2f5);
    border:1px solid #e2e8f0;
}
.tutor-card:hover { box-shadow: 0 6px 18px -6px rgba(16,185,129,0.25),0 2px 4px rgba(0,0,0,.05); }
.dark .tutor-card { background: linear-gradient(145deg,#1e293b,#0f172a); border-color:#334155; }
.dark .tutor-card:hover { box-shadow:0 6px 18px -6px rgba(16,185,129,0.35),0 2px 4px rgba(0,0,0,.4); }
.tutor-card .avatar-tile { background: linear-gradient(135deg,#059669,#10b981); }
.dark .tutor-card .avatar-tile { background: linear-gradient(135deg,#047857,#059669); }
.tutor-card .hover-overlay { background: radial-gradient(circle at 30% 20%, rgba(16,185,129,0.12), transparent 70%); }
.primary-btn { background: linear-gradient(90deg,#059669,#10b981); color:#fff; }
.primary-btn:hover { background: linear-gradient(90deg,#047857,#059669); }
.dark .primary-btn { background: linear-gradient(90deg,#047857,#059669); }
.dark .primary-btn:hover { background: linear-gradient(90deg,#065f46,#047857); }
.calendar-day {
    aspect-ratio: 1;
    display: flex;
    width: 100%;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.5rem;
    position: relative;
    font-weight: 500;
    border: 1px solid transparent;
    background: linear-gradient(145deg, rgba(255,255,255,0.1), rgba(255,255,255,0.05));
    backdrop-filter: blur(5px);
}

.calendar-day:hover:not(.day-disabled) {
    transform: scale(1.05);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    background: linear-gradient(145deg, rgba(93, 92, 222, 0.2), rgba(93, 92, 222, 0.1));
}

.day-available {
    background-color: rgba(93, 92, 222, 0.15);
    color: #5D5CDE;
    border: 1px solid rgba(93, 92, 222, 0.3);
}

.dark .day-available {
    background-color: rgba(122, 121, 241, 0.15);
    color: #7A79F1;
    border: 1px solid rgba(122, 121, 241, 0.3);
}

.day-booked {
    background-color: rgba(255, 0, 0, 0.15);
    color: #FF4040;
    border: 1px solid rgba(255, 0, 0, 0.3);
}

.dark .day-booked {
    background-color: rgba(255, 77, 77, 0.15);
    color: #FF4D4D;
    border: 1px solid rgba(255, 77, 77, 0.3);
}

.day-disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.05);
}

.dark .day-disabled {
    background-color: rgba(255, 255, 255, 0.05);
}

.day-today {
    font-weight: 700;
    box-shadow: inset 0 0 0 2px #5D5CDE;
}

.dark .day-today {
    box-shadow: inset 0 0 0 2px #7A79F1;
}

.day-selected {
    background-color: rgba(93, 92, 222, 0.3);
    box-shadow: inset 0 0 0 2px #5D5CDE;
}

.dark .day-selected {
    box-shadow: inset 0 0 0 2px #7A79F1;
}

.calendar-container {
    padding: 0.5rem;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.dark .calendar-container {
    background-color: rgba(0, 0, 0, 0.2);
}

.calendar-header {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #555;
}

.dark .calendar-header {
    color: #aaa;
}

.day-available::after {
    content: "";
    position: absolute;
    bottom: 3px;
    width: 6px;
    height: 6px;
    background-color: #5D5CDE;
    border-radius: 50%;
}

.dark .day-available::after {
    background-color: #7A79F1;
}

.day-booked::after {
    content: "";
    position: absolute;
    bottom: 3px;
    width: 6px;
    height: 6px;
    background-color: #FF4040;
    border-radius: 50%;
}

.dark .day-booked::after {
    background-color: #FF4D4D;
}

#calendar-grid, #sitter-calendar-grid {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

/* Animation Styles */
.fade-transition {
    transition: all 0.3s ease;
}

.slide-in {
    animation: slideIn 0.3s ease forwards;
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(10px);
    }
    to { 
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slide-in {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

@keyframes progress {
    from {
        width: 100%;
    }
    to {
        width: 0%;
    }
}

.animate-slide-in {
    animation: slide-in 0.3s ease-out;
}

.animate-fade-out {
    animation: fade-out 0.3s ease-in;
}

.animate-progress {
    animation: progress linear;
}

/* Loading Spinner */
.loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #5D5CDE;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.dark .loader {
    border: 4px solid #333;
    border-top: 4px solid #7A79F1;
}

/* Notification Styles */
.notification-item {
    max-width: 400px;
    word-wrap: break-word;
}

/* Modal Styles */
.modal-backdrop {
    backdrop-filter: blur(4px);
}

/* Make modal content more horizontal */
.modal-content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    align-items: start;
}

.modal-full-width {
    grid-column: 1 / -1;
}

/* Time template grid adjustments */
.time-templates-compact {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

/* Responsive modal layout */
@media (max-width: 640px) {
    .modal-content-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .time-templates-compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #availability-modal-content {
        max-width: 95vw;
    }
}

/* Time Slot Styles */
.time-slot-item {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 0.5rem;
    background-color: #f9fafb;
}

.dark .time-slot-item {
    border: 1px solid #374151;
    background-color: #1f2937;
}

.time-slot-item.invalid {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.dark .time-slot-item.invalid {
    border-color: #dc2626;
    background-color: #7f1d1d;
}

/* Button Animations */
.btn-animate:active {
    transform: scale(0.95);
}

/* Tooltip Styles */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1f2937;
    color: white;
    padding: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 1000;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* Enhanced Availability Modal Styles */
.availability-modal-enter {
    opacity: 1 !important;
    backdrop-filter: blur(8px);
}

.availability-modal-enter #availability-modal-content {
    transform: scale(1) translate(0) !important;
    opacity: 1 !important;
}

.availability-modal-exit {
    opacity: 0;
    transition: opacity 300ms ease-out;
}

.availability-modal-exit #availability-modal-content {
    transform: scale(0.95) translateY(20px);
    opacity: 0;
    transition: all 300ms ease-out;
}

/* Step indicator animations */
.step-indicator {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.step-indicator.active {
    background-color: rgba(255, 255, 255, 0.9) !important;
    transform: scale(1.2);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.step-indicator.completed {
    background-color: rgba(255, 255, 255, 1) !important;
    transform: scale(1.1);
}

/* Time template hover effects */
.time-template {
    position: relative;
    overflow: hidden;
}

.time-template::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.1), transparent);
    transition: left 0.5s ease;
}

.time-template:hover::before {
    left: 100%;
}

.time-template.selected {
    border-color: rgb(16 185 129) !important;
    background: rgb(236 253 245) !important;
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
}

.dark .time-template.selected {
    background: rgb(6 78 59 / 0.3) !important;
}

/* Special rate input animations */
#special-rate-input {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                opacity 0.3s ease, 
                padding 0.3s ease;
    opacity: 0;
}

#special-rate-input:not(.hidden) {
    max-height: 200px;
    opacity: 1;
}

/* Duration display animations */
#duration-display {
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#duration-display:not(.hidden) {
    transform: translateY(0);
}

/* Enhanced form controls */
.enhanced-select {
    background-image: none;
    appearance: none;
}

.enhanced-select:focus {
    transform: scale(1.02);
}

/* Smart suggestions animation */
#smart-suggestions {
    transform: translateY(-20px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#smart-suggestions:not(.hidden) {
    transform: translateY(0);
}

/* Success feedback animation */
#success-feedback {
    transform: scale(0.9) translateY(10px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

#success-feedback:not(.hidden) {
    transform: scale(1) translateY(0);
}

/* Save button states */
#save-availability.saving {
    background: rgb(107 114 128) !important;
    cursor: not-allowed;
    transform: none !important;
}

#save-availability.success {
    background: rgb(34 197 94) !important;
    transform: scale(1.05);
    animation: success-pulse 0.6s ease-out;
}

@keyframes success-pulse {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.1); box-shadow: 0 0 20px rgba(34, 197, 94, 0.4); }
    100% { transform: scale(1.05); }
}

/* Enhanced toggle switch */
input[type="checkbox"]:checked + div {
    background: linear-gradient(135deg, rgb(79 70 229), rgb(99 102 241)) !important;
}

/* Micro-interactions for form elements */
input:focus, select:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1), 
                0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Estimated earnings animation */
#estimated-earnings {
    transition: all 0.3s ease;
}

.earnings-update {
    color: rgb(34 197 94) !important;
    transform: scale(1.1);
}

/* Time helper tooltip styles */
.time-helper-tooltip {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(17 24 39);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.time-helper-tooltip::before {
    content: '';
    position: absolute;
    top: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 4px solid rgb(17 24 39);
}

.time-helper-tooltip.show {
    opacity: 1;
}

/* Loading spinner for save button */
@keyframes button-spinner {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#save-loading .animate-spin {
    animation: button-spinner 1s linear infinite;
}

/* Enhanced Calendar Styles */
.calendar-enhanced {
    position: relative;
}

.calendar-enhanced .calendar-day {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.calendar-enhanced .calendar-day:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.2);
    z-index: 10;
}

.calendar-enhanced .calendar-day.available {
    background: linear-gradient(135deg, rgb(34 197 94), rgb(22 163 74)) !important;
    color: white;
    font-weight: 600;
}

.calendar-enhanced .calendar-day.pending {
    background: linear-gradient(135deg, rgb(249 115 22), rgb(234 88 12)) !important;
    color: white;
    font-weight: 600;
}

.calendar-enhanced .calendar-day.booked {
    background: linear-gradient(135deg, rgb(239 68 68), rgb(220 38 38)) !important;
    color: white;
    font-weight: 600;
}

.calendar-enhanced .calendar-day::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.calendar-enhanced .calendar-day:hover::before {
    left: 100%;
}

/* Floating animation for decorative elements */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-10px) rotate(1deg); }
    66% { transform: translateY(-5px) rotate(-1deg); }
}

@keyframes float-delayed {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    33% { transform: translateY(-8px) rotate(-1deg); }
    66% { transform: translateY(-12px) rotate(1deg); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 8s ease-in-out infinite;
}

/* Enhanced card hover effects for dashboard */
.sitter-dashboard .lg\\:col-span-1 > div:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

.sitter-dashboard .lg\\:col-span-2 > div:hover,
.sitter-dashboard .lg\\:col-span-3 > div:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Availability modal backdrop blur enhancement */
#availability-modal.availability-modal-enter {
    backdrop-filter: blur(12px);
    background: rgba(0, 0, 0, 0.7);
}

/* Quick action button enhancements */
#set-week-available:active,
#set-weekend-available:active {
    transform: scale(0.98);
}

/* Earnings animation for rate updates */
.earnings-highlight {
    background: linear-gradient(90deg, #fbbf24, #f59e0b, #fbbf24);
    background-size: 200% 200%;
    animation: earnings-shimmer 2s ease-in-out;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@keyframes earnings-shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Loading state for calendar */
.calendar-loading {
    position: relative;
}

.calendar-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border: 3px solid #f3f4f6;
    border-top: 3px solid #10b981;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Step indicator enhanced animation */
.step-indicator.active {
    animation: step-pulse 1.5s ease-in-out infinite;
}

@keyframes step-pulse {
    0%, 100% { 
        transform: scale(1.2);
        box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    }
    50% { 
        transform: scale(1.4);
        box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
    }
}

/* Enhanced tooltip styles */
.enhanced-tooltip {
    position: relative;
}

.enhanced-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgb(17 24 39);
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.enhanced-tooltip::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(2px);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgb(17 24 39);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.enhanced-tooltip:hover::after,
.enhanced-tooltip:hover::before {
    opacity: 1;
}

/* Smart suggestions enhanced styles */
#smart-suggestions {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(147, 51, 234, 0.1));
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.dark #smart-suggestions {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(147, 51, 234, 0.15));
    border: 1px solid rgba(59, 130, 246, 0.3);
}

/* Success feedback enhanced animation */
@keyframes success-slide-in {
    0% {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.05) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

#success-feedback:not(.hidden) {
    animation: success-slide-in 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile responsiveness enhancements */
@media (max-width: 768px) {
    .sitter-dashboard .grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .calendar-enhanced .calendar-day {
        font-size: 14px;
        padding: 8px;
    }
    
    #availability-modal .space-y-6 {
        gap: 16px;
    }
}

/* Dark mode enhancements */
.dark .bg-gradient-to-br {
    background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.dark .calendar-enhanced .calendar-day:hover {
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

/* Focus-visible for better accessibility */
.time-template:focus-visible,
button:focus-visible {
    outline: 2px solid rgb(16 185 129);
    outline-offset: 2px;
}

/* Sitter Dashboard Layout Fixes */
.sitter-dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Prevent hover scaling on availability card */
.availability-card {
    transition: none !important;
    transform: none !important;
}

.availability-card:hover {
    transform: none !important;
    scale: none !important;
}

/* Set consistent heights for dashboard sections */
.dashboard-section {
    min-height: 600px;
    max-height: 600px;
    overflow: hidden; /* Prevent content from expanding beyond container */
}

.availability-section {
    min-height: 600px;
    max-height: 600px;
    overflow: hidden; /* Prevent any overflow that would cause overlap */
    display: flex;
    flex-direction: column;
}

.availability-section .availability-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.availability-section .p-6:last-child {
    flex: 1;
    overflow-y: auto; /* Allow scrolling within the card content if needed */
    display: flex;
    flex-direction: column;
}

.booking-requests-section {
    min-height: 600px;
    max-height: 600px;
    overflow-y: auto; /* Keep scroll only for booking requests */
}

/* Ensure confirmed bookings section has enough margin */
.confirmed-bookings-container {
    margin-top: 4rem; /* Add more space above confirmed bookings */
    clear: both; /* Ensure it clears any floated content */
}

/* Fix availability modal height to be shorter and wider */
#availability-modal-content {
    max-height: 70vh;
    max-width: 800px;
    width: 90%;
    overflow-y: auto;
}

#availability-modal .modal-content-inner {
    max-height: calc(70vh - 120px);
    overflow-y: auto;
}

/* Responsive grid for smaller screens */
@media (max-width: 1024px) {
    .sitter-dashboard-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .dashboard-section {
        min-height: 500px;
        max-height: 600px;
    }
    
    .booking-requests-section {
        min-height: 400px;
        max-height: 500px;
    }
    
    .availability-section {
        min-height: 500px;
        max-height: 600px;
    }
    
    .confirmed-bookings-container {
        margin-top: 2rem; /* Less margin on mobile */
    }
}

/* Additional height fixes for modal */
@media (max-height: 800px) {
    #availability-modal-content {
        max-height: 75vh;
        max-width: 750px;
    }
    
    #availability-modal .modal-content-inner {
        max-height: calc(75vh - 120px);
    }
}

@media (max-height: 600px) {
    #availability-modal-content {
        max-height: 90vh;
        max-width: 900px;
    }
    
    #availability-modal .modal-content-inner {
        max-height: calc(90vh - 100px);
    }
}

/* Certificate export button styling */
#export-certificate-btn {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#export-certificate-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#export-certificate-btn:hover::before {
    left: 100%;
}

#export-certificate-btn:hover {
    transform: scale(1.05) translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

#export-certificate-btn:active {
    transform: scale(0.98);
}

/* Certificate animation */
@keyframes certificateGenerate {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.generating-certificate {
    animation: certificateGenerate 0.6s ease-in-out;
}

/* Enhanced Existing Availability Banner */
#existing-availability-banner {
    animation: slideInFromTop 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.1) 0%, 
        rgba(16, 185, 129, 0.15) 50%, 
        rgba(5, 150, 105, 0.1) 100%
    );
    border: 2px solid rgba(34, 197, 94, 0.3);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.dark #existing-availability-banner {
    background: linear-gradient(135deg, 
        rgba(34, 197, 94, 0.15) 0%, 
        rgba(16, 185, 129, 0.2) 50%, 
        rgba(5, 150, 105, 0.15) 100%
    );
    border: 2px solid rgba(34, 197, 94, 0.4);
}

#existing-availability-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    animation: shimmer 3s ease-in-out infinite;
}

@keyframes slideInFromTop {
    0% {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes shimmer {
    0% { left: -100%; }
    50% { left: -100%; }
    100% { left: 100%; }
}

/* Availability info styling */
.availability-info-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: center;
}

.availability-time-display {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 700;
    font-size: 1.125rem;
    letter-spacing: 0.025em;
    color: rgb(34, 197, 94);
}

.dark .availability-time-display {
    color: rgb(74, 222, 128);
}

.availability-duration {
    font-weight: 600;
    color: rgb(16, 185, 129);
}

.dark .availability-duration {
    color: rgb(52, 211, 153);
}

.availability-earnings {
    font-weight: 700;
    background: linear-gradient(135deg, rgb(251, 191, 36), rgb(245, 158, 11));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: earnings-glow 2s ease-in-out infinite alternate;
}

@keyframes earnings-glow {
    0% { filter: brightness(1); }
    100% { filter: brightness(1.2); }
}

/* Edit button in banner */
.availability-edit-btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.availability-edit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.5s;
}

.availability-edit-btn:hover::before {
    left: 100%;
}

.availability-edit-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(34, 197, 94, 0.3);
}

/* Modal layout enhancements */
.modal-content-inner {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-full-width {
    width: 100%;
    grid-column: 1 / -1;
}

/* Responsive adjustments for existing availability */
@media (max-width: 640px) {
    .availability-info-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 0.75rem;
    }
    
    #existing-availability-banner {
        padding: 1rem;
    }
    
    .availability-time-display {
        font-size: 1rem;
    }
}

/* Auth Popup Themed Enhancements */
.auth-popup-surface {
    animation: fadeInScale 0.5s cubic-bezier(0.4,0,0.2,1);
}

.brand-icon-wrapper {
    background: linear-gradient(135deg, var(--primary-light, #7089f5), #a855f7);
    padding: 0.75rem 0.9rem;
    border-radius: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px -6px rgba(112,137,245,0.4);
}

.brand-icon-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(255,255,255,0.4), transparent 70%);
    opacity: 0.35;
    mix-blend-mode: overlay;
}

.tab-button-active {
    box-shadow: 0 6px 18px -4px rgba(112,137,245,0.5), 0 2px 4px rgba(0,0,0,0.15);
}

/* Gradient animation keyframes reused */
@keyframes gradient-x { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
    .auth-popup-surface .brand-icon-wrapper { box-shadow: 0 8px 24px -6px rgba(168,85,247,0.45); }
}

/* Enhanced Profile Menu Styles */
.profile-menu-panel {
    backdrop-filter: blur(10px);
    background: linear-gradient(145deg, rgba(255,255,255,0.95), rgba(248,250,252,0.95));
}

.dark .profile-menu-panel {
    background: linear-gradient(145deg, rgba(17,24,39,0.95), rgba(31,41,55,0.95));
}

/* Custom Scrollbar */
.scrollbar-thin::-webkit-scrollbar {
    width: 6px;
}

.scrollbar-thin::-webkit-scrollbar-track {
    background: transparent;
}

.scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(156, 163, 175, 0.5);
    border-radius: 3px;
}

.dark .scrollbar-thin::-webkit-scrollbar-thumb {
    background: rgba(75, 85, 99, 0.5);
}

/* Enhanced Focus States */
.focus\:ring-emerald-500:focus {
    --tw-ring-color: rgb(16 185 129);
}

.focus\:ring-purple-500:focus {
    --tw-ring-color: rgb(139 92 246);
}

.focus\:ring-blue-500:focus {
    --tw-ring-color: rgb(59 130 246);
}

/* Achievement Badge Animations */
@keyframes badge-glow {
    0%, 100% { 
        box-shadow: 0 0 5px rgba(251, 191, 36, 0.3);
    }
    50% { 
        box-shadow: 0 0 20px rgba(251, 191, 36, 0.6), 0 0 30px rgba(251, 191, 36, 0.4);
    }
}

.achievement-badge:hover {
    animation: badge-glow 2s ease-in-out infinite;
}

/* Profile Card Hover Effects */
.profile-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.profile-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px -8px rgba(0, 0, 0, 0.1);
}

/* Tab Navigation Enhancement */
.tab-nav {
    background: rgba(243, 244, 246, 0.8);
    backdrop-filter: blur(5px);
}

.dark .tab-nav {
    background: rgba(31, 41, 55, 0.8);
}

/* Skill Level Badge Variations */
.skill-level-elementary { background: linear-gradient(135deg, #fbbf24, #f59e0b); }
.skill-level-middle { background: linear-gradient(135deg, #10b981, #059669); }
.skill-level-high { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.skill-level-ap { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.skill-level-college { background: linear-gradient(135deg, #ef4444, #dc2626); }
.skill-level-graduate { background: linear-gradient(135deg, #6366f1, #4f46e5); }
