/* Custom Styles - Synced with React Tailwind UI */
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* Card Style (matches React: @apply bg-white rounded-2xl shadow-sm border border-gray-200 hover:shadow-md transition) */
.card {
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

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

/* Button Primary (matches React: @apply bg-primary-600 text-white px-4 py-2 rounded-lg hover:bg-primary-700 transition-colors font-medium) */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: linear-gradient(135deg, #6d28d9 0%, #0f766e 100%);
    color: white;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5b21b6 0%, #0d4d47 100%);
}

.btn-primary span,
.btn-primary svg {
    color: #ffffff;
}

/* Button Secondary (matches React: @apply bg-gray-100 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-200 transition-colors font-medium) */
.btn-secondary {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    background-color: #f3f4f6;
    color: #374151;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.15s ease;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

/* Input Field (matches React: @apply w-full px-4 py-2 border border-gray-300 rounded-lg focus:outline-none focus:ring-2 focus:ring-primary-500 focus:border-transparent) */
.input-field {
    width: 100%;
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    outline: none;
    transition: all 0.15s ease;
}

.input-field:focus {
    box-shadow: 0 0 0 2px rgba(109, 40, 217, 0.24);
    border-color: transparent;
}

/* Line clamp utilities for text truncation */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Rotate utility */
.rotate-180 {
    transform: rotate(180deg);
}

/* Navigation active state */
.nav-link.active {
    color: #6d28d9;
    background-color: #f5f3ff;
}

/* Prose styles for blog content */
.prose h1 {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    color: #111827;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.prose p {
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose h2 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.25;
    color: #111827;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    color: #111827;
    margin-top: 1.75rem;
    margin-bottom: 0.875rem;
}

.prose h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.35;
    color: #111827;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose h5 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.4;
    color: #111827;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.prose h6 {
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.5;
    color: #111827;
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.prose .ql-size-huge {
    font-size: 2.25rem;
    line-height: 1.2;
}

.prose .ql-size-large {
    font-size: 1.5rem;
    line-height: 1.3;
}

.prose .ql-size-small {
    font-size: 0.875rem;
    line-height: 1.5;
}

.prose ul, .prose ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.75;
}

.prose ul {
    list-style-type: disc;
}

.prose ol {
    list-style-type: decimal;
}

.prose strong {
    font-weight: 700;
}

/* Smooth transitions for mobile sidebar */
.transition-transform {
    transition-property: transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Tab scrollbar hide for clean tab navigation */
nav::-webkit-scrollbar {
    display: none;
}
nav {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Ensure touch targets meet minimum 44px */
@media (hover: none) and (pointer: coarse) {
    .nav-link {
        min-height: 44px;
    }
}

/* Fade-in animation */
.fade-in {
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

body.auth-modal-open {
    position: fixed;
    width: 100%;
    overflow: hidden;
}

.auth-modal-frame {
    min-height: 100vh;
}

.auth-modal-card {
    max-height: calc(100vh - 2rem);
    overflow: visible;
}

.auth-modal-native-select {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.auth-modal-custom-select {
    position: relative;
}

.auth-modal-select-trigger {
    width: 100%;
    min-height: 46px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    color: #111827;
    font-size: 0.875rem;
    line-height: 1.25rem;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

.auth-modal-select-trigger:hover {
    border-color: #9ca3af;
}

.auth-modal-custom-select.is-open .auth-modal-select-trigger,
.auth-modal-custom-select:focus-within .auth-modal-select-trigger {
    border-color: #14b8a6;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.18);
}

.auth-modal-custom-select.has-error .auth-modal-select-trigger {
    border-color: #f87171;
    box-shadow: 0 0 0 3px rgba(248, 113, 113, 0.14);
}

.auth-modal-select-value {
    color: #111827;
    font-weight: 500;
    text-align: left;
}

.auth-modal-custom-select.is-placeholder .auth-modal-select-value {
    color: #9ca3af;
    font-weight: 400;
}

.auth-modal-select-chevron {
    color: #0f766e;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.15s ease, color 0.15s ease;
}

.auth-modal-custom-select.is-open .auth-modal-select-chevron {
    transform: rotate(180deg);
    color: #14b8a6;
}

.auth-modal-select-panel {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    right: 0;
    z-index: 20;
    padding: 0.5rem;
    border: 1px solid rgba(20, 184, 166, 0.25);
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
    max-height: 18rem;
    overflow-y: auto;
}

.auth-modal-custom-select.opens-upward .auth-modal-select-panel {
    top: auto;
    bottom: calc(100% + 0.5rem);
}

.auth-modal-select-option {
    width: 100%;
    display: block;
    text-align: left;
    padding: 0.75rem 0.875rem;
    border: 0;
    border-radius: 0.875rem;
    background: transparent;
    color: #0f172a;
    font-size: 0.9375rem;
    line-height: 1.25rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.auth-modal-select-option:hover,
.auth-modal-select-option:focus-visible {
    background: #f5f3ff;
    color: #5b21b6;
    outline: none;
}

.auth-modal-select-option.is-selected {
    background: linear-gradient(135deg, #6d28d9 0%, #0f766e 100%);
    color: #ffffff;
    font-weight: 600;
}

@media (min-width: 640px) {
    .auth-student-form,
    .auth-mentor-form {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 1rem;
        row-gap: 0.85rem;
        align-items: start;
    }

    .auth-step-actions {
        grid-column: 1 / -1;
    }

    .auth-step-header {
        margin-bottom: 1rem;
    }
}

@media (min-width: 768px) {
    .auth-modal-card {
        padding: 1.25rem 1.5rem;
    }
}
