/* Yellow Rose RV Park PWA - Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --yrrv-gold: #F5C518;
    --yrrv-dark: #1a1a1a;
    --yrrv-brown: #6B3F1F;
    --yrrv-green: #2E7D32;
    --yrrv-light: #FFF8E1;
    --yrrv-white: #FFFFFF;
    --yrrv-gray: #6c757d;
    --bottom-nav-height: 70px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: #f8f9fa;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ===== TOP HEADER ===== */
.app-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--header-height);
    background: var(--yrrv-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}

.app-header .brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--yrrv-dark);
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.app-header .back-btn {
    position: absolute;
    left: 16px;
    background: none;
    border: none;
    font-size: 1.4rem;
    color: var(--yrrv-dark);
    cursor: pointer;
    padding: 4px 8px;
    text-decoration: none;
}

/* ===== MAIN CONTENT ===== */
.app-content {
    padding-top: calc(var(--header-height) + 12px);
    padding-bottom: calc(var(--bottom-nav-height) + 20px);
    min-height: 100vh;
}

/* ===== BOTTOM NAVIGATION ===== */
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: var(--bottom-nav-height);
    background: var(--yrrv-dark);
    display: flex;
    align-items: stretch;
    z-index: 1000;
    box-shadow: 0 -3px 15px rgba(0,0,0,0.2);
}

.bottom-nav .nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: rgba(255,255,255,0.55);
    gap: 4px;
    padding: 8px 4px;
    transition: all 0.2s ease;
    position: relative;
    border: none;
    background: none;
    cursor: pointer;
}

.bottom-nav .nav-item:hover,
.bottom-nav .nav-item.active {
    color: var(--yrrv-gold);
}

.bottom-nav .nav-item.active::after {
    content: '';
    position: absolute;
    top: 0; left: 15%; right: 15%;
    height: 3px;
    background: var(--yrrv-gold);
    border-radius: 0 0 3px 3px;
}

.bottom-nav .nav-item svg {
    width: 22px;
    height: 22px;
    stroke-width: 1.8;
}

.bottom-nav .nav-item span {
    font-size: 0.58rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--yrrv-gold) 0%, #E6B800 100%);
    padding: 32px 20px 28px;
    text-align: center;
    border-radius: 0 0 24px 24px;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: -20px; left: -20px;
    width: 80px; height: 80px;
    background: rgba(0,0,0,0.05);
    border-radius: 50%;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--yrrv-dark);
    margin: 0 0 8px;
    line-height: 1.2;
    position: relative;
    z-index: 1;
}

.hero-subtitle {
    font-size: 0.9rem;
    color: rgba(26,26,26,0.75);
    margin: 0;
    line-height: 1.5;
    position: relative;
    z-index: 1;
}

/* ===== CARDS ===== */
.yrrv-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    overflow: hidden;
    margin-bottom: 16px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.yrrv-card:active {
    transform: scale(0.98);
}

.yrrv-card .card-header-custom {
    background: var(--yrrv-gold);
    padding: 14px 18px;
    font-weight: 700;
    color: var(--yrrv-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.yrrv-card .card-body-custom {
    padding: 18px;
}

/* ===== QUICK ACTION BUTTONS ===== */
.quick-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 0 16px;
    margin-bottom: 24px;
}

.quick-action-btn {
    background: #fff;
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    text-decoration: none;
    color: var(--yrrv-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border: 2px solid transparent;
    transition: all 0.2s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.quick-action-btn:hover,
.quick-action-btn:active {
    border-color: var(--yrrv-gold);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(245,197,24,0.25);
    color: var(--yrrv-dark);
}

.quick-action-btn .icon {
    width: 44px;
    height: 44px;
    background: var(--yrrv-gold);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.quick-action-btn .label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* ===== SECTION HEADERS ===== */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    margin-bottom: 12px;
}

.section-header h2 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--yrrv-dark);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-header a {
    font-size: 0.82rem;
    color: var(--yrrv-brown);
    text-decoration: none;
    font-weight: 600;
}

/* ===== FORMS ===== */
.app-form {
    background: #fff;
    border-radius: 20px;
    padding: 24px 20px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    margin: 0 0 20px;
}

.app-form .form-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--yrrv-dark);
    margin-bottom: 6px;
}

.app-form .form-control,
.app-form .form-select {
    border-radius: 10px;
    border: 1.5px solid #e0e0e0;
    padding: 12px 14px;
    font-size: 0.92rem;
    transition: border-color 0.2s;
}

.app-form .form-control:focus,
.app-form .form-select:focus {
    border-color: var(--yrrv-gold);
    box-shadow: 0 0 0 3px rgba(245,197,24,0.15);
    outline: none;
}

.btn-yrrv-primary {
    background: var(--yrrv-gold);
    border: none;
    color: var(--yrrv-dark);
    font-weight: 700;
    font-size: 1rem;
    padding: 14px 24px;
    border-radius: 12px;
    width: 100%;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.btn-yrrv-primary:hover {
    background: #e6b800;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(245,197,24,0.4);
}

.btn-yrrv-primary:active {
    transform: translateY(0);
}

.btn-yrrv-outline {
    background: transparent;
    border: 2px solid var(--yrrv-gold);
    color: var(--yrrv-dark);
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 12px;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-yrrv-outline:hover {
    background: var(--yrrv-gold);
    color: var(--yrrv-dark);
}

/* ===== RESTAURANT CARDS ===== */
.restaurant-card {
    background: #fff;
    border-radius: 16px;
    padding: 16px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 14px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    transition: transform 0.15s;
}

.restaurant-card:active { transform: scale(0.98); }

.restaurant-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: var(--yrrv-light);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    overflow: hidden;
}

.restaurant-icon img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.restaurant-info { flex: 1; min-width: 0; }

.restaurant-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.restaurant-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.star-rating {
    color: var(--yrrv-gold);
    font-size: 0.75rem;
    font-weight: 600;
}

.distance-badge {
    background: var(--yrrv-light);
    color: var(--yrrv-brown);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 20px;
}

/* ===== EVENT CARDS ===== */
.event-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    margin-bottom: 14px;
    display: flex;
    border-left: 4px solid var(--yrrv-gold);
}

.event-date-badge {
    background: var(--yrrv-gold);
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 64px;
}

.event-date-badge .month {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--yrrv-dark);
    letter-spacing: 0.5px;
}

.event-date-badge .day {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--yrrv-dark);
    line-height: 1;
}

.event-info {
    padding: 14px 16px;
    flex: 1;
}

.event-info h3 {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 4px;
}

.event-info p {
    font-size: 0.8rem;
    color: var(--yrrv-gray);
    margin: 0 0 8px;
    line-height: 1.4;
}

/* ===== SUCCESS / ALERT STATES ===== */
.success-container {
    text-align: center;
    padding: 40px 24px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--yrrv-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2rem;
}

/* ===== MAP ===== */
#map-container {
    width: 100%;
    background: #f0f0f0;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    touch-action: none;
    cursor: grab;
}

#map-container:active { cursor: grabbing; }

#panzoom-wrapper {
    width: 100%;
}

#panzoom-wrapper img,
#panzoom-wrapper svg {
    display: block;
    width: 100%;
    height: auto;
}

.map-controls {
    position: absolute;
    bottom: 16px;
    right: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 10;
}

.map-btn {
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: background 0.15s;
}

.map-btn:hover { background: var(--yrrv-gold); }

/* ===== CONTACT ACTIONS ===== */
.contact-action-btn {
    background: #fff;
    border-radius: 16px;
    padding: 18px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--yrrv-dark);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    margin-bottom: 12px;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.contact-action-btn:hover {
    border-color: var(--yrrv-gold);
    color: var(--yrrv-dark);
    transform: translateX(4px);
}

.contact-action-btn .btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--yrrv-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-action-btn .btn-text strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
}

.contact-action-btn .btn-text span {
    font-size: 0.78rem;
    color: var(--yrrv-gray);
}

/* ===== ADMIN STYLES ===== */
.admin-sidebar {
    background: var(--yrrv-dark);
    min-height: 100vh;
    width: 240px;
}

.admin-stat-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    border-left: 4px solid var(--yrrv-gold);
}

.admin-stat-card .stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--yrrv-dark);
    line-height: 1;
}

.admin-stat-card .stat-label {
    font-size: 0.85rem;
    color: var(--yrrv-gray);
    margin-top: 4px;
}

/* ===== PWA INSTALL BANNER ===== */
#pwa-install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 10px);
    left: 10px; right: 10px;
    background: var(--yrrv-dark);
    color: #fff;
    border-radius: 16px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.25);
    z-index: 999;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from { transform: translateY(120%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

#pwa-install-banner .install-icon { font-size: 1.8rem; }

#pwa-install-banner .install-text { flex: 1; }
#pwa-install-banner .install-text strong { display: block; font-size: 0.9rem; }
#pwa-install-banner .install-text span { font-size: 0.78rem; color: rgba(255,255,255,0.65); }

.btn-install {
    background: var(--yrrv-gold);
    color: var(--yrrv-dark);
    border: none;
    border-radius: 10px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    white-space: nowrap;
}

.btn-dismiss {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 4px;
}

/* ===== UTILITY ===== */
.page-padding { padding: 0 16px; }

.pill-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
}

.pill-gold { background: var(--yrrv-light); color: var(--yrrv-brown); }
.pill-green { background: #e8f5e9; color: var(--yrrv-green); }
.pill-red { background: #fde8e8; color: #c62828; }

/* ===== SIGNATURE PAD ===== */
#signature-pad {
    border: 2px dashed #e0e0e0;
    border-radius: 10px;
    background: #fafafa;
    cursor: crosshair;
    touch-action: none;
}

/* Responsive tweaks */
@media (min-width: 768px) {
    .app-content { max-width: 480px; margin: 0 auto; }
    .bottom-nav  { max-width: 480px; margin: 0 auto; left: 50%; transform: translateX(-50%); right: auto; width: 480px; }
    .app-header  { max-width: 480px; margin: 0 auto; left: 50%; transform: translateX(-50%); right: auto; width: 480px; }
    #pwa-install-banner { max-width: 460px; left: 50%; transform: translateX(-50%); right: auto; bottom: calc(var(--bottom-nav-height) + 10px); }
}
