/* ============================================================
   Smartrooms Housing Solution - Custom Styles
   ============================================================ */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Image Aspect Ratio Helper */
.aspect-4-3 {
    aspect-ratio: 4/3;
}

.aspect-square {
    aspect-ratio: 1/1;
}

/* Property Card Animations */
.property-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.property-card:hover {
    transform: translateY(-4px);
}

.property-card .image-overlay {
    transition: opacity 0.3s ease;
    opacity: 0;
}

.property-card:hover .image-overlay {
    opacity: 1;
}

/* Gallery Slider */
.gallery-slider {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.gallery-slider img {
    scroll-snap-align: start;
}

/* Loading Skeleton */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
}

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

/* Filter Badge Animation */
.filter-badge {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Focus Styles for Accessibility */
*:focus-visible {
    outline: 2px solid #f97316;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Custom Checkbox */
.custom-checkbox {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid #d1d5db;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox:checked {
    background-color: #1e3a5f;
    border-color: #1e3a5f;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
    background-size: 12px;
    background-position: center;
    background-repeat: no-repeat;
}

/* Price Badge Pulse */
.price-badge {
    animation: fadeInUp 0.4s ease-out;
}

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

/* Responsive Table */
.responsive-table {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.responsive-table table {
    min-width: 600px;
}

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

.card-hover:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Gradient Overlay */
.gradient-overlay {
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
}

/* Notification Badge */
.notification-badge {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Stats Counter */
.stat-counter {
    font-feature-settings: "tnum";
}

/* File Upload Zone */
.upload-zone {
    border: 2px dashed #d1d5db;
    transition: all 0.3s;
}

.upload-zone:hover,
.upload-zone.dragover {
    border-color: #1e3a5f;
    background: #eff6ff;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1000;
    animation: slideInRight 0.3s ease-out;
}

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

/* Range Slider Custom Styling */
input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: #e5e7eb;
    border-radius: 3px;
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e3a5f;
    cursor: pointer;
    transition: all 0.2s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #1e3a5f;
    cursor: pointer;
    border: none;
}

/* Print Styles */
@media print {
    .no-print { display: none !important; }
    body { font-size: 12pt; color: #000; }
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
    }
}

@media (min-width: 1025px) {
    .property-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.25rem;
    }
}

/* Full screen gallery */
.fullscreen-gallery {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
}

.fullscreen-gallery.active {
    display: flex;
}

/* Tab Styles */
.tab-active {
    color: #1e3a5f;
    border-bottom-color: #1e3a5f;
}

/* Custom Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    padding-right: 36px;
}
