/*
 * Airbnb-Style Design System
 * Global styles for SnapWerks
 */

:root {
    /* Colors - Snapwerks Green Palette */
    --airbnb-primary: #16a34a;
    --airbnb-primary-hover: #15803d;
    --airbnb-dark: #222222;
    --airbnb-gray: #717171;
    --airbnb-light-gray: #DDDDDD;
    --airbnb-border: #EBEBEB;
    --airbnb-background: #FFFFFF;
    --airbnb-secondary-bg: #F7F7F7;
    
    /* Typography */
    --font-family: 'Inter Variable', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.08);
    --shadow-md: 0 2px 4px rgba(0,0,0,0.08), 0 4px 12px rgba(0,0,0,0.05);
    --shadow-lg: 0 4px 8px rgba(0,0,0,0.08), 0 8px 24px rgba(0,0,0,0.08);
    --shadow-float: 0 6px 16px rgba(0,0,0,0.12);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    /* Spacing */
    --container-max: 1280px;
}

/* Base Styles */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    color: var(--airbnb-dark);
    background: var(--airbnb-background);
    line-height: 1.5;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    color: var(--airbnb-dark);
    line-height: 1.2;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
h4 { font-size: 1rem; }

p {
    color: var(--airbnb-gray);
    line-height: 1.6;
}

a {
    color: var(--airbnb-primary-hover);
    text-decoration: none;
    transition: color 0.2s ease;
}


/* Buttons - Airbnb Style */
.btn-airbnb-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #16a34a;
    color: white;
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
}

.btn-airbnb-primary:hover {
    background: #15803d;
    color: white;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-airbnb-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: white;
    color: var(--airbnb-dark);
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--airbnb-dark);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-airbnb-secondary:hover {
    background: var(--airbnb-secondary-bg);
    color: var(--airbnb-dark);
}

.btn-airbnb-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--airbnb-dark);
    font-weight: 600;
    padding: 0.875rem 1.5rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--airbnb-border);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-airbnb-outline:hover {
    border-color: var(--airbnb-dark);
    background: var(--airbnb-secondary-bg);
    color: var(--airbnb-dark);
}

/* Cards - Airbnb Style */
.card-airbnb {
    background: white;
    border-radius: var(--radius-lg);
    border: 1px solid var(--airbnb-border);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.card-airbnb:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

/* Navigation - Airbnb Style */
.nav-airbnb {
    background: white;
    border-bottom: 1px solid var(--airbnb-border);
    position: sticky;
    top: 0;
    z-index: 50;
}

.nav-airbnb-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Mobile Menu Button */
@media (max-width: 768px) {
    .nav-airbnb-container {
        height: 70px;
        padding: 0 1rem;
    }
}

/* Search Bar - Airbnb Style */
.search-airbnb {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--airbnb-border);
    border-radius: var(--radius-full);
    padding: 0.5rem 1rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.search-airbnb:hover {
    box-shadow: var(--shadow-md);
}

.search-airbnb input {
    border: none;
    outline: none;
    font-size: 0.875rem;
    color: var(--airbnb-dark);
}

/* Avatar - Airbnb Style */
.avatar-airbnb {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    background: var(--airbnb-secondary-bg);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--airbnb-gray);
    overflow: hidden;
}

/* Badge - Airbnb Style */
.badge-airbnb {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-airbnb-verified {
    background: #00A699;
    color: white;
}

.badge-airbnb-new {
    background: var(--airbnb-secondary-bg);
    color: var(--airbnb-dark);
}

/* Rating Stars */
.rating-airbnb {
    display: flex;
    align-items: center;
    gap: 0.125rem;
}

.rating-airbnb .star {
    width: 1rem;
    height: 1rem;
}

.rating-airbnb .star.filled {
    color: var(--airbnb-dark);
}

.rating-airbnb .star.empty {
    color: var(--airbnb-light-gray);
}

/* Container */
.container-airbnb {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Section Spacing */
.section-airbnb {
    padding: 3rem 0;
}

/* Grid System */
.grid-airbnb {
    display: grid;
    gap: 1.5rem;
}

.grid-airbnb-2 { grid-template-columns: repeat(2, 1fr); }
.grid-airbnb-3 { grid-template-columns: repeat(3, 1fr); }
.grid-airbnb-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 1024px) {
    .grid-airbnb-4 { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .grid-airbnb-3, .grid-airbnb-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
    .grid-airbnb-2, .grid-airbnb-3, .grid-airbnb-4 { grid-template-columns: 1fr; }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

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

/* Line Clamp */
.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;
}

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

/* Utilities */
.text-primary { color: var(--airbnb-primary); }
.text-dark { color: var(--airbnb-dark); }
.text-gray { color: var(--airbnb-gray); }

.bg-primary { background: var(--airbnb-primary); }
.bg-secondary { background: var(--airbnb-secondary-bg); }

.border-light { border-color: var(--airbnb-border); }

.shadow-airbnb-sm { box-shadow: var(--shadow-sm); }
.shadow-airbnb-md { box-shadow: var(--shadow-md); }
.shadow-airbnb-lg { box-shadow: var(--shadow-lg); }

.rounded-airbnb-sm { border-radius: var(--radius-sm); }
.rounded-airbnb-md { border-radius: var(--radius-md); }
.rounded-airbnb-lg { border-radius: var(--radius-lg); }
.rounded-airbnb-xl { border-radius: var(--radius-xl); }
.rounded-airbnb-full { border-radius: var(--radius-full); }

/* Footer - Airbnb Style */
.footer-airbnb {
    background: var(--airbnb-secondary-bg);
    border-top: 1px solid var(--airbnb-border);
    padding: 3rem 0;
}

.footer-airbnb-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

@media (max-width: 768px) {
    .footer-airbnb-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.footer-airbnb h4 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-airbnb ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-airbnb li {
    margin-bottom: 0.75rem;
}

.footer-airbnb a {
    color: var(--airbnb-gray);
    font-size: 0.875rem;
}

.footer-airbnb a:hover {
    text-decoration: underline;
}

.footer-airbnb a.btn-airbnb-primary,
.footer-airbnb a.btn-airbnb-primary:hover {
    color: white;
    text-decoration: none;
}

/* Divider */
.divider-airbnb {
    height: 1px;
    background: var(--airbnb-border);
    margin: 2rem 0;
}

/* Modal - Airbnb Style */
.modal-airbnb {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
}

.modal-airbnb-content {
    background: white;
    border-radius: var(--radius-xl);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

/* Toast/Alert - Airbnb Style */
.toast-airbnb {
    background: var(--airbnb-dark);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Loading Spinner - Airbnb Style */
.spinner-airbnb {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--airbnb-border);
    border-top-color: var(--airbnb-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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