/* Typography */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

:root {
    --font-sans: 'Montserrat', sans-serif;
    --bg-primary: #FFFFFF;
    --bg-secondary: #F7F8FA;
    --text-main: #1A1A1A;
    --text-muted: #64748B;
    --accent: #0E253B;
    --accent-hover: #0c2135;
    --radius-custom: 14px;
    --glass-bg: rgba(255, 255, 255, 0.75);
    --glass-border: rgba(229, 231, 235, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.04), 0 1px 3px 0 rgba(0, 0, 0, 0.02);
}

/* Base resets & styles */
body {
    font-family: var(--font-sans);
    background-color: var(--bg-secondary);
    color: var(--text-main);
    overflow-x: hidden;
}

/* Custom rounded corners for all core components */
.rounded-custom,
input,
textarea,
select,
button,
.card,
.modal-content,
.toast,
.dropdown-menu,
.sidebar,
.navbar,
.glass-card,
.glass-panel,
.glass-modal,
.notification-modal-card {
    border-radius: var(--radius-custom) !important;
}

/* Glassmorphism Styles */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

.glass-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.02);
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.06), 0 2px 5px 0 rgba(0, 0, 0, 0.03);
}

.glass-modal {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
}

.glass-sidebar {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: scale(1);
    }

    to {
        opacity: 0;
        transform: scale(0.95);
    }
}

.animate-fade-in {
    animation: fadeIn 0.2s ease-out forwards;
}

.animate-fade-out {
    animation: fadeOut 0.25s ease-in forwards;
}

/* ─── Toast premium animations ─── */
@keyframes toastDropIn {
    0% {
        opacity: 0;
        transform: translateY(-28px) scale(0.93);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }

    55% {
        opacity: 1;
        transform: translateY(4px) scale(1.02);
        box-shadow: 0 18px 48px rgba(0, 0, 0, 0.13), 0 4px 12px rgba(14, 37, 59, 0.10);
    }

    80% {
        transform: translateY(-2px) scale(1.005);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(14, 37, 59, 0.08);
    }
}

@keyframes toastFadeOut {
    0% {
        opacity: 1;
        transform: translateY(0) scale(1);
        box-shadow: 0 12px 36px rgba(0, 0, 0, 0.10);
    }

    40% {
        opacity: 0.7;
        transform: translateY(-6px) scale(0.98);
    }

    100% {
        opacity: 0;
        transform: translateY(-20px) scale(0.94);
        box-shadow: 0 0 0 rgba(0, 0, 0, 0);
    }
}

.toast-enter {
    animation: toastDropIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.toast-leave {
    animation: toastFadeOut 0.32s cubic-bezier(0.4, 0, 1, 1) forwards;
}

/* Smart buttons load state */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-top: -8px;
    margin-left: -8px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Interactive Star Rating (Reviews) */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: center;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 2rem;
    color: #CBD5E1;
    cursor: pointer;
    transition: color 0.15s ease, transform 0.15s ease;
    padding: 0 4px;
}

.star-rating label:hover,
.star-rating label:hover~label,
.star-rating input:checked~label {
    color: #FBBF24;
    transform: scale(1.15);
}

.star-rating label:active {
    transform: scale(0.9);
}

/* Success Checkmark Animation */
.success-checkmark {
    width: 80px;
    height: 80px;
    margin: 0 auto;
}

.success-checkmark .check-icon {
    width: 80px;
    height: 80px;
    position: relative;
    border-radius: 50%;
    box-sizing: content-box;
    border: 4px solid #4CAF50;
}

.success-checkmark .check-icon::before {
    top: 3px;
    left: -2px;
    width: 30px;
    transform-origin: 100% 50%;
    border-radius: 100px 0 0 100px;
}

.success-checkmark .check-icon::after {
    top: 0;
    left: 30px;
    width: 60px;
    transform-origin: 0 50%;
    border-radius: 0 100px 100px 0;
}

.success-checkmark .check-icon::before,
.success-checkmark .check-icon::after {
    content: '';
    height: 100px;
    position: absolute;
    background: transparent;
    transform: rotate(-45deg);
}

.success-checkmark .check-icon .icon-line {
    height: 5px;
    background-color: #4CAF50;
    display: block;
    border-radius: 2px;
    position: absolute;
    z-index: 10;
}

.success-checkmark .check-icon .icon-line.line-tip {
    top: 46px;
    left: 14px;
    width: 25px;
    transform: rotate(45deg);
    animation: icon-line-tip 0.75s;
}

.success-checkmark .check-icon .icon-line.line-long {
    top: 38px;
    right: 8px;
    width: 47px;
    transform: rotate(-45deg);
    animation: icon-line-long 0.75s;
}

.success-checkmark .check-icon .icon-circle {
    top: -4px;
    left: -4px;
    box-sizing: content-box;
    border: 4px solid rgba(76, 175, 80, .5);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    position: absolute;
    z-index: 1;
}

.success-checkmark .check-icon .icon-fix {
    top: 8px;
    left: 28px;
    width: 5px;
    height: 85px;
    position: absolute;
    z-index: 1;
    transform: rotate(-45deg);
}

@keyframes icon-line-tip {
    0% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    54% {
        width: 0;
        left: 1px;
        top: 19px;
    }

    70% {
        width: 5px;
        left: 14px;
        top: 37px;
    }

    84% {
        width: 17px;
        left: 14px;
        top: 48px;
    }

    100% {
        width: 25px;
        left: 14px;
        top: 46px;
    }
}

@keyframes icon-line-long {
    0% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    65% {
        width: 0;
        right: 46px;
        top: 54px;
    }

    84% {
        width: 24px;
        right: 38px;
        top: 48px;
    }

    100% {
        width: 47px;
        right: 8px;
        top: 38px;
    }
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* Form Styles */
input,
select,
textarea {
    border: 1px solid #E2E8F0 !important;
    background-color: #FFFFFF !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none !important;
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(14, 37, 59, 0.1) !important;
}

/* Custom floating navbar */
.floating-navbar {
    position: fixed;
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    margin: 0 auto;
    max-width: 80rem;
    width: calc(100% - 1rem);
    border-radius: var(--radius-custom) !important;
    background: rgba(255, 255, 255, 0.96) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(229, 231, 235, 0.8) !important;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05) !important;
    z-index: 50;
    transition: all 0.3s ease;
}

/* Adjust page padding for fixed navbar */
body {
    padding-top: calc(4.5rem + 10px);
}

/* Non-transparent dropdown and notifications card */
.solid-dropdown {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    z-index: 100;
}

/* Dropdown style notifications */
.notification-dropdown {
    background: #FFFFFF !important;
    border: 1px solid #E2E8F0 !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04) !important;
    z-index: 100;
    position: absolute;
    right: 0;
    margin-top: 0.75rem;
    width: 24rem;
}

@media (max-width: 640px) {
    .notification-dropdown {
        position: fixed !important;
        top: 5rem !important;
        left: 1rem !important;
        right: 1rem !important;
        width: auto !important;
        margin-top: 0 !important;
    }
}

/* Navbar search wrapper - always visible */
.navbar-search-wrapper {
    display: flex;
    align-items: center;
    opacity: 1;
    overflow: visible;
}

/* Disabled Rental card styling */
.rental-disabled-card {
    opacity: 0.75;
    filter: grayscale(15%);
}