/* Custom styles for Lakerink Mathematics */

/* Global styles */
:root {
    --primary-color: #4a56e2;
    --secondary-color: #2d3142;
    --accent-color: #63c7b2;
    --text-color: #555;
    --light-bg: #f8f9fa;
    --math-accent: #ff6b6b;
    --gradient-start: #4a56e2;
    --gradient-end: #63c7b2;

    --disabled-bg-primary:   #8a8fcf;
    --disabled-bg-secondary: #8a8d9e;
    --disabled-bg-danger:    #d1a1a1;
    --disabled-bg-warning:   #d8bf7a;
    --disabled-text:         #f3f4f6;
    --disabled-bg-default:   #f3f4f6;
    --disabled-text-default: #9ca3af;
    --disabled-border:       rgba(0,0,0,0.08);
}

body {
    font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-bg);
}

h1, h2, h3, h4, h5, h6, .uk-heading-small, .uk-heading-medium, .uk-heading-large {
    font-family: 'Raleway', sans-serif;
    font-weight: 600;
}

/* Header styles */
.uk-navbar-container {
    background: rgba(255,255,255,0.95) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: auto;
    padding: 2px 0;
}

.uk-navbar-left .uk-logo {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Compact logo styles */
.compact-logo {
    padding: 2px 15px;
}

.compact-logo img {
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 1px;
    background: white;
}

.logo-text {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.uk-navbar-left .uk-logo h1 {
    color: var(--secondary-color);
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1;
    margin-bottom: 4px;
}

.uk-navbar-left .uk-logo p {
    color: var(--text-color);
    font-size: 0.85rem;
    margin-top: 0;
}

.uk-navbar-right {
    margin-right: 30px;
}

.uk-navbar-nav > li > a {
    font-weight: 600;
    text-transform: none;
    color: var(--secondary-color);
    padding: 0 15px;
    position: relative;
    transition: color 0.3s ease;
}

.uk-navbar-nav > li > a::after {
    content: '';
    position: absolute;
    bottom: 15px;
    left: 15px;
    right: 15px;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.uk-navbar-nav > li:hover > a::after,
.uk-navbar-nav > li.uk-active > a::after {
    transform: scaleX(1);
}

.uk-navbar-nav > li:hover > a,
.uk-navbar-nav > li.uk-active > a {
    color: var(--primary-color);
}

/* Hero section */
#home {
    position: relative;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: none;
    z-index: 1;
}

#home > div {
    position: relative;
    z-index: 2;
}

#home h1 {
    font-weight: 700;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
    margin-bottom: 2rem;
    color: #ffffff;
    background-color: rgba(0,0,0,0.25);
    padding: 10px 15px;
    border-radius: 5px;
    display: inline-block;
}

/* Section styling */
.uk-section {
    padding-top: 80px;
    padding-bottom: 80px;
}

.uk-heading-line {
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    text-align: center;
}

.uk-heading-line > span {
    position: relative;
    display: inline-block;
    padding: 0 20px;
    z-index: 1;
}

.uk-heading-line > span::before,
.uk-heading-line > span::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 300px;
    height: 1px;
    background: #e5e5e5;
}

.uk-heading-line > span::before {
    right: 100%;
    margin-right: 15px;
}

.uk-heading-line > span::after {
    left: 100%;
    margin-left: 15px;
}

/* Cards styling */
.uk-card {
    transition: all 0.3s ease;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.uk-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 25px rgba(0,0,0,0.1);
}

.uk-card-default {
    background: #fff;
    border: none;
}

.uk-card-title {
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.uk-card-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    height: 3px;
    width: 50px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 3px;
}

/* Button styling — shared structural pattern */
.uk-button {
    border-radius: 4px;
    font-weight: 600;
    text-transform: none;
    white-space: nowrap;
    transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.uk-button:hover {
    transform: translateY(-2px);
}

.uk-button:disabled,
.uk-button:disabled:hover {
    box-shadow: none;
    transform: none;
    cursor: not-allowed;
    color: var(--disabled-text);
    border-color: var(--disabled-border);
}

/* Primary */
.uk-button-primary {
    background: var(--primary-color);
    color: #fff;
    padding: 0 30px;
    box-shadow: 0 4px 10px rgba(74, 86, 226, 0.3);
}

.uk-button-primary:hover {
    background: var(--primary-color);
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(74, 86, 226, 0.4);
}

.uk-button-primary:disabled,
.uk-button-primary:disabled:hover {
    background: var(--disabled-bg-primary);
}

/* Default */
.uk-button-default {
    background: #fff;
    border: 1px solid #d1d5db;
    color: var(--secondary-color);
    box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}

.uk-button-default:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.uk-button-default:disabled,
.uk-button-default:disabled:hover {
    background: var(--disabled-bg-default);
    border-color: var(--disabled-border);
    color: var(--disabled-text-default);
}

/* Secondary */
.uk-button-secondary {
    background: var(--secondary-color);
    color: #fff;
    box-shadow: 0 4px 10px rgba(45, 49, 66, 0.3);
}

.uk-button-secondary:hover {
    background: var(--secondary-color);
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(45, 49, 66, 0.4);
}

.uk-button-secondary:disabled,
.uk-button-secondary:disabled:hover {
    background: var(--disabled-bg-secondary);
}

/* Danger */
.uk-button-danger {
    background: #e74c3c;
    color: #fff;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.uk-button-danger:hover {
    background: #e74c3c;
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.uk-button-danger:disabled,
.uk-button-danger:disabled:hover {
    background: var(--disabled-bg-danger);
}

/* Warning (used in quick actions) */
.uk-button-warning {
    background: #f0a030;
    color: #fff;
    box-shadow: 0 4px 10px rgba(240, 160, 48, 0.3);
}

.uk-button-warning:hover {
    background: #f0a030;
    opacity: 0.9;
    box-shadow: 0 6px 15px rgba(240, 160, 48, 0.4);
}

.uk-button-warning:disabled,
.uk-button-warning:disabled:hover {
    background: var(--disabled-bg-warning);
}

/* Text */
.uk-button-text {
    padding: 0;
    line-height: 1.5;
    background: none;
    color: var(--primary-color);
    font-weight: 600;
    text-transform: none;
}

.uk-button-text:hover {
    color: var(--primary-color);
    opacity: 0.8;
    transform: none;
}

.uk-button-text:disabled,
.uk-button-text:disabled:hover,
.uk-button.uk-button-text:disabled,
.uk-button.uk-button-text:disabled:hover,
.uk-button.uk-button-link:disabled,
.uk-button.uk-button-link:disabled:hover,
.uk-button-link:disabled,
.uk-button-link:disabled:hover {
    color: var(--disabled-text-default);
    opacity: 1;
    background: none;
    border-color: transparent;
}

/* Link */
.uk-button-link {
    padding: 0;
    line-height: 1.5;
    background: none;
    color: var(--primary-color);
    font-weight: 500;
}

.uk-button-link:hover {
    color: var(--primary-color);
    opacity: 0.8;
    transform: none;
}

/* Back navigation links */
a.uk-link-text {
    width: fit-content;
    width: -moz-fit-content;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    background-image: linear-gradient(var(--primary-color), var(--primary-color));
    background-repeat: no-repeat;
    background-position: bottom left;
    background-size: 0% 1px;
    transition: background-size 0.25s ease, opacity 0.2s ease;
}

a.uk-link-text:hover {
    color: var(--primary-color);
    opacity: 0.8;
    background-size: 100% 1px;
}

/* Form styling */
.uk-input,
.uk-textarea {
    border-radius: 3px;
}

.uk-textarea {
    resize: vertical;
}

.uk-form-label {
    font-weight: 500;
    color: var(--secondary-color);
}

/* Footer styling */
.uk-section-secondary {
    background: var(--secondary-color);
}

.uk-icon-button {
    margin: 0 5px;
    transition: transform 0.2s ease;
}

.uk-icon-button:hover {
    transform: scale(1.1);
}

/* Availability table */
.availability-table th {
    font-weight: 600;
}

.availability-table th,
.availability-table td {
    text-align: center;
    padding: 8px;
    white-space: nowrap;
}

.availability-table th {
    background-color: #f8f8f8;
}

.availability-table {
    width: 100%;
    table-layout: fixed;
    overflow-x: auto;
}

.uk-label.uk-label-availability {
    background-color: #f8f8f8;
    color: var(--text-color);
}

.uk-label.uk-label-booked {
    background-color: #f0506e;
    color: white;
}

.uk-label.uk-label-available {
    background-color: var(--accent-color);
    color: white;
}

@media (max-width: 640px) {
    .availability-table .uk-label {
        font-size: 0.7rem;
        padding: 2px 6px;
    }
}

/* Mobile card styling for availability */
.uk-card-small .uk-card-header {
    border-bottom: 1px solid #e5e5e5;
}

.uk-card-small .uk-list-divider > li:not(:first-child) {
    border-top-color: #e5e5e5;
    padding-top: 8px;
    margin-top: 8px;
}

.uk-card-small .uk-card-title {
    font-size: 1.1rem;
    color: #333;
}

/* Application page styling - disable card hover animations only */
.app-page .uk-card:hover {
    transform: none;
}

/* Responsive adjustments */
@media (max-width: 959px) {
    .uk-section {
        padding-top: 60px;
        padding-bottom: 60px;
    }
    
    #home h1 {
        font-size: 2rem;
    }
}

@media (max-width: 640px) {
    .uk-navbar-left .uk-logo {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .uk-navbar-left .uk-logo h1 {
        font-size: 1.2rem;
        margin-top: 0.5rem;
    }
    
    .uk-navbar-left .uk-logo p {
        font-size: 0.8rem;
    }
}

@media (max-width: 640px) {
    .dashboard-tabs-mobile {
        flex-direction: column;
    }
    .dashboard-tabs-mobile.uk-tab::before {
        display: none !important;
    }
    .dashboard-tabs-mobile > li > a {
        padding: 12px 16px;
        border-radius: 4px;
    }
    .dashboard-tabs-mobile > .uk-active > a {
        background-color: #1e87f0;
        color: #fff;
        border-bottom: none !important;
        border-color: transparent !important;
    }
}

/* Animations */
.uk-scrollspy-inview {
    animation: uk-fade-bottom-medium 0.5s ease-out;
}

/* Form container styling */
.uk-card.form-container {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #d1d5db;
    background: #ffffff;
    padding: 2rem;
    transition: none;
}

.uk-card.form-container:hover {
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 1px solid #d1d5db;
}

/* Session status labels */
.uk-label-no-session {
    background-color: #ddd !important;
    color: #000 !important;
}

/* Booking form status labels */
.uk-label-cancelled {
    background-color: #ddd !important;
    color: #000 !important;
}

.cancelled-chain-entry {
    opacity: 0.6;
}


/* === Past Sessions Filter Toggle Switch === */
.past-sessions-toggle-checkbox {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: 0;
    padding: 0;
    border: 0;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    overflow: hidden;
    white-space: nowrap;
}

.past-sessions-toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    background-color: #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: background-color 0.25s;
    vertical-align: middle;
    flex-shrink: 0;
}

.past-sessions-toggle-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background-color: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.past-sessions-toggle-checkbox:checked + .past-sessions-toggle-switch {
    background-color: var(--primary-color, #4a56e2);
}

.past-sessions-toggle-checkbox:checked + .past-sessions-toggle-switch::after {
    transform: translateX(20px);
}

.past-sessions-toggle-label {
    cursor: pointer;
    user-select: none;
    line-height: 24px;
}

/* === Past Sessions Notes Feed === */
.past-session-card {
    border-left: 3px solid var(--primary-color, #4a56e2);
}

.past-sessions-notes-feed > .past-session-card:nth-child(even) {
    background: #f8f8f8;
}

.past-session-card-header {
    background: #e8e8e8;
}

.student-profile-card--match {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.student-profile-card--match .student-profile-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.student-profile-card--match .past-session-card-header {
    min-height: 3rem;
}

.student-profile-card-grid > * {
    display: flex;
}

.student-profile-card-grid .student-profile-card {
    width: 100%;
}

.past-session-reply-separator {
    border-top: 1px dashed #d0d0d0;
    border-bottom: none;
}

.past-session-note-block {
    padding-left: 12px;
    border-left: 2px solid #e0e0e0;
}

.past-session-note-heading {
    color: var(--primary-color, #4a56e2);
    margin-bottom: 2px;
}

.past-session-note-content p {
    margin: 0 0 4px 0;
}

.past-session-note-content p:last-child {
    margin-bottom: 0;
}

/* Impersonation banner */
.impersonation-banner {
    position: sticky;
    top: 0;
    z-index: 9999;
    background: #d32f2f;
    color: #fff;
    padding: 12px 20px;
    text-align: center;
    font-size: 16px;
    font-weight: bold;
}

.impersonation-banner .impersonation-return-btn {
    background: #fff;
    color: #d32f2f;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    font-weight: bold;
    cursor: pointer;
    margin-left: 16px;
}

.impersonation-banner .impersonation-return-btn:hover {
    background: #f5f5f5;
}

.uk-card-light-blue {
    background: #e8f4f8;
}

/* ── UIkit toast notifications ── */
.uk-notification {
    width: 380px;
}

.uk-notification-message {
    position: relative;
    border-radius: 10px;
    padding: 14px 44px 14px 16px;
    margin-top: 10px;
    font-size: 0.925rem;
    line-height: 1.5;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    border: none;
    color: #fff;
    transition: opacity 0.2s ease;
}

.uk-notification-message:hover {
    opacity: 0.92;
}

.uk-notification-message-primary {
    background: var(--primary-color);
}

.uk-notification-message-success {
    background: #2e9e6b;
}

.uk-notification-message-warning {
    background: #d4892a;
}

.uk-notification-message-danger {
    background: #d14545;
}

/* Close button — top-right, always visible, no movement */
.uk-notification-message .uk-notification-close,
.uk-notification-message:hover .uk-notification-close {
    position: absolute;
    top: 8px;
    right: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    color: rgba(255,255,255,0.7);
    transition: none;
}

.uk-notification-message .uk-notification-close:hover {
    background: rgba(255,255,255,0.2);
    color: #fff;
}

/* Mobile */
@media (max-width: 767px) {
    .uk-notification {
        width: auto;
        right: 12px;
        left: 12px;
    }

    .uk-notification-message {
        font-size: 0.9rem;
        padding: 12px 40px 12px 14px;
    }
}

.uk-button-disabled-tooltip,
.uk-button-disabled-tooltip * {
    pointer-events: none !important;
}

.uk-button-disabled-tooltip {
    opacity: 0.4 !important;
    cursor: default;
}

.tab-panel {
    display: none;
}

.tab-panel.tab-active {
    display: block;
}

/* Accordion chevron animation */
.accordion-chevron {
    transition: transform 0.2s ease;
}
.uk-open .accordion-chevron {
    transform: rotate(180deg);
}
@media (prefers-reduced-motion: reduce) {
    .accordion-chevron {
        transition: none;
    }
}

/* Global student search (navbar strip + modal results) */
#nav-student-search-results:empty {
    display: none;
}
#nav-student-search-results a:hover,
#nav-student-search-results a:focus,
#student-search-results a:hover,
#student-search-results a:focus {
    background: #f0f7ff;
}

#nav-student-search {
    background: #fff;
    border-bottom: 1px solid #e5e5e5;
    height: 56px;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    padding-left: 24px;
    padding-right: 24px;
    width: 100%;
    overflow: visible;
}
#nav-student-search-input {
    height: 38px;
}

/* ── Phone: Tasks/Payments + Signed Forms list items ── */
/* ── Phone: Notifications card ── */
@media (max-width: 640px) {
    .uk-list-divider > li:has(> div.uk-grid-small a.uk-button) > div.uk-grid-small {
        flex-direction: column;
        align-items: stretch;
    }
    .uk-list-divider > li > div.uk-grid-small > div:has(> a.uk-button) {
        width: 100%;
        margin-top: 8px;
    }
    .notification-item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding-right: 44px;
    }
    .notification-item .dismiss-notification {
        position: absolute;
        top: 8px;
        right: 8px;
    }
}

