/* Custom Styles for UniNest */
html {
    scroll-behavior: smooth;
}

.gradient-single {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.gradient-shared {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.gradient-apartment {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.gradient-house {
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
}

.gradient-studio {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
}

.gradient-shop {
    background: linear-gradient(135deg, #14b8a6 0%, #0d9488 100%);
}

.card-hover:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #10b981;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #059669;
}

/* =========================================
   Responsiveness & Media Queries for Small Devices
   ========================================= */

/* Tablets and Below (max-width: 768px) */
@media screen and (max-width: 768px) {
    .hide-on-tablet {
        display: none !important;
    }
}

/* Small Devices / Mobile Phones (max-width: 640px) */
@media screen and (max-width: 640px) {

    /* Utility classes to identify/manage small devices */
    .hide-on-small {
        display: none !important;
    }

    .show-on-small {
        display: block !important;
    }

    .text-center-small {
        text-align: center !important;
    }

    .w-full-small {
        width: 100% !important;
    }

    /* Existing Component Adjustments */
    .search-filter-grid {
        align-items: stretch !important;
    }

    .btn-stack-mobile {
        flex-direction: column !important;
    }

    .btn-stack-mobile>* {
        margin-left: 0 !important;
        margin-top: 0.5rem !important;
        width: 100% !important;
    }

    .btn-stack-mobile>*:first-child {
        margin-top: 0 !important;
    }

    .hero-section {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }
}

/* Extra Small Devices (max-width: 480px) */
@media screen and (max-width: 480px) {
    .hide-on-extra-small {
        display: none !important;
    }

    .text-sm-mobile {
        font-size: 0.875rem !important;
    }
}

/* Skeleton Loader */
@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

.skeleton {
    background: #f1f5f9;
    background-image: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%);
    background-repeat: no-repeat;
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    border-radius: 0.5rem;
}

.img-skeleton-container {
    position: relative;
    background: #f1f5f9;
    overflow: hidden;
}

.img-skeleton-container::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, #f1f5f9 0%, #e2e8f0 20%, #f1f5f9 40%, #f1f5f9 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    z-index: 10;
    transition: opacity 0.4s ease-out;
}

.img-skeleton-container.loaded::before {
    opacity: 0;
    pointer-events: none;
}

/* Loading Spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

.btn-loading {
    position: relative;
    pointer-events: none;
    color: transparent !important;
}

.btn-loading::after {
    content: "";
    position: absolute;
    width: 1.25rem;
    height: 1.25rem;
    top: calc(50% - 0.625rem);
    left: calc(50% - 0.625rem);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.6s linear infinite;
}

/* Global Form Input Styles - Force Visibility */
input,
textarea,
select {
    background-color: #ffffff !important;
    color: #111827 !important;
    border-color: #d1d5db;
}

/* Specific Input Types */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="search"] {
    background-color: #ffffff !important;
    color: #111827 !important;
}

/* Placeholder Styling */
::placeholder {
    color: #9ca3af !important;
    opacity: 1;
}

/* Toast Notification System */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    background: #ffffff;
    border-left: 4px solid #10b981;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border-radius: 0.375rem;
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto;
    animation: toast-slide-in 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
    transition: all 0.3s ease;
}

.toast.toast-error {
    border-left-color: #ef4444;
}

.toast.toast-error .toast-icon {
    color: #ef4444;
}

.toast.toast-info {
    border-left-color: #3b82f6;
}

.toast.toast-info .toast-icon {
    color: #3b82f6;
}

.toast-closing {
    animation: toast-slide-out 0.3s ease forwards;
}

@keyframes toast-slide-in {
    from {
        transform: translateX(110%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-slide-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(110%);
        opacity: 0;
    }
}