/* /css/app.css */
:root {
    --ion-color-primary: #c03d30;
    --ion-color-primary-rgb: 192, 61, 48;
    --ion-color-primary-contrast: #ffffff;
    --ion-color-primary-contrast-rgb: 255, 255, 255;
    --ion-color-primary-shade: #a9362a;
    --ion-color-primary-tint: #c94f43;
    
    --gp-primary: #c03d30;
    --gp-text: #111111;
    --gp-muted: #6b7280;
    --gp-bg: #f5f6f7;
    --gp-border: #e5e7eb;
    
    --color-background: #f5f6f7;
}

* {
    box-sizing: border-box;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, sans-serif;
    margin: 0;
    padding: 0;
}

ion-app {
    display: flex;
    flex-direction: column;
    height: 100vh;
}

ion-header {
    position: sticky;
    top: 0;
    z-index: 100;
}

ion-footer {
    position: sticky;
    bottom: 0;
    z-index: 100;
}

ion-content {
    --background: var(--color-background);
    flex: 1;
    overflow-y: auto;
}

/* Header Styling */
ion-toolbar {
    --background: #ffffff;
    --border-color: #e0e0e0;
    height: 56px;
}

.header-logo {
    height: 24px;
    width: auto;
    display: inline-block;
    vertical-align: middle;
}

ion-toolbar ion-buttons ion-button {
    --padding-start: 8px;
    --padding-end: 8px;
}

ion-toolbar ion-buttons ion-icon {
    font-size: 28px;
}

ion-toolbar {
    --min-height: 56px;
}

ion-toolbar ion-title {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tab Bar Styling */
ion-tab-bar {
    --background: #ffffff;
    border-top: 1px solid #e0e0e0;
    height: 56px;
}

ion-tab-button {
    --color: #64686d;
    --color-selected: #233659;
}

ion-tab-button[aria-selected="true"] {
    --color: #233659;
}

ion-tab-button ion-badge {
    position: absolute;
    top: 4px;
    right: calc(50% - 25px);
    font-size: 10px;
    min-width: 16px;
    height: 16px;
}

/* Login Seite */
.login-container {
    max-width: 400px;
    margin: 50px auto;
    padding: 20px;
}

.logo-section {
    text-align: center;
    margin-bottom: 40px;
}

.login-logo {
    max-height: 40px;
    width: auto;
    margin: 20px auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.logo-section h1 {
    color: var(--gp-primary);
    font-size: 2.5em;
    margin: 0;
    font-weight: 700;
}

.login-form {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.login-form ion-item {
    margin-bottom: 20px;
    --highlight-color-focused: var(--ion-color-primary);
}

.login-form ion-button {
    margin-top: 30px;
    height: 48px;
    font-weight: 600;
    font-size: 16px;
}

/* Cards & Listen */
ion-card {
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin: 16px;
}

ion-card-header {
    padding: 16px;
}

ion-card-content {
    padding: 16px;
}

ion-list {
    background: transparent;
}

ion-item {
    --border-radius: 12px;
    --padding-start: 16px;
    --padding-end: 16px;
}

/* Badges & Chips */
ion-badge {
    border-radius: 12px;
    padding: 4px 8px;
    font-weight: 600;
}

ion-chip {
    --border-radius: 8px;
    height: 28px;
    font-size: 13px;
}

/* Buttons */
ion-button {
    --border-radius: 12px;
    font-weight: 600;
    text-transform: none;
}

/* Segment */
ion-segment {
    --background: white;
    margin: 16px;
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
    max-width: calc(100% - 32px);
}

ion-segment-button {
    --indicator-color: var(--gp-primary);
    --color: var(--gp-text);
    --color-checked: white;
    --indicator-color-checked: var(--gp-primary);
    --background: white;
    --background-checked: var(--gp-primary);
    text-transform: none;
    font-weight: 500;
    min-width: 0;
    flex: 1;
    --padding-start: 12px;
    --padding-end: 12px;
}

ion-segment-button.segment-button-checked {
    color: white;
}

ion-segment-button::part(indicator) {
    border-radius: 8px;
}

ion-segment-button::part(native) {
    border-radius: 8px;
}

/* Sticky Segment Wrapper */
.sticky-segment-wrapper {
    position: sticky;
    top: 0;
    z-index: 90;
    background: var(--gp-bg);
    padding: 8px 0;
    margin-top: -8px;
}

.sticky-segment-wrapper ion-segment {
    margin: 8px 16px;
}

/* Content Bereiche */
.segment-content {
    display: none;
}

.segment-content.active {
    display: block;
}

.map-placeholder {
    height: 400px;
    background: linear-gradient(135deg, #e8eaf0 0%, #d4d8e0 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin: 16px;
    color: #64686d;
}

/* Restaurant Cards */
.restaurant-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
}

.chips {
    margin: 12px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.quick-actions {
    margin-top: 12px;
    display: flex;
    gap: 8px;
}

.quick-actions ion-button {
    height: 32px;
    font-size: 13px;
}

/* Filter */
.filter-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.filter-chips ion-chip {
    cursor: pointer;
    transition: all 0.2s;
}

.filter-chips ion-chip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Preis & Payment */
.price {
    font-size: 1.5em;
    color: var(--ion-color-primary);
    font-weight: bold;
}

.payment-icons {
    display: flex;
    gap: 12px;
    font-size: 24px;
    margin: 12px 0;
    color: #64686d;
}

.payment-methods {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Status */
.open {
    color: #4caf50;
    font-weight: 600;
}

.closed {
    color: #f44336;
    font-weight: 600;
}

/* Inbox */
.unread {
    background: linear-gradient(90deg, rgba(35, 54, 89, 0.05) 0%, rgba(35, 54, 89, 0.02) 100%);
}

ion-avatar {
    width: 48px;
    height: 48px;
}

ion-avatar img {
    border-radius: 50%;
    object-fit: cover;
}

/* FAB Buttons */
ion-fab-button {
    --border-radius: 16px;
    --box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Modal/Bottom Sheet */
ion-modal {
    --border-radius: 16px 16px 0 0;
}

#bottomSheet {
    --height: auto;
    --max-height: 70%;
}

/* Utilities */
.float-right {
    float: right;
}

.preference-chips {
    margin: 16px 0;
}

/* Responsive */
@media (min-width: 768px) {
    ion-card {
        max-width: 600px;
        margin: 16px auto;
    }
    
    .login-container {
        margin: 100px auto;
    }
}

/* GastPilot Footer */
.gp-footer-spacer {
    height: 70px;
    padding-bottom: env(safe-area-inset-bottom);
}

.gp-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 1px solid var(--gp-border);
    z-index: 999;
    padding-bottom: env(safe-area-inset-bottom);
}

.gp-tabbar {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 64px;
    width: 100%;
}

.gp-tab {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--gp-muted);
    position: relative;
    height: 100%;
    transition: color 0.2s;
}

.gp-tab.active {
    color: var(--gp-primary);
}

.gp-tab ion-icon {
    font-size: 24px;
}

.gp-tab span {
    font-size: 12px;
    font-weight: 500;
}

.gp-tab .gp-badge {
    position: absolute;
    top: 8px;
    right: calc(50% - 18px);
    background: var(--gp-primary);
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 10px;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Animations */
ion-button {
    transition: transform 0.2s, box-shadow 0.2s;
}

ion-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(35, 54, 89, 0.2);
}

ion-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

ion-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}
/* ===== MARKER & POPUP FINALISIERUNG ===== */

/* Scharfe Marker */
.custom-marker {
    background: none !important;
    border: none !important;
}

.custom-marker svg {
    display: block;
    image-rendering: crisp-edges;
    shape-rendering: geometricPrecision;
}

/* Popup Container */
.gp-popup-container {
    border-radius: 12px !important;
}

.gp-popup-container .leaflet-popup-content-wrapper {
    padding: 0;
    border-radius: 12px;
}

.gp-popup-container .leaflet-popup-tip {
    background: white;
}

.gp-popup {
    padding: 16px;
    font-family: system-ui, -apple-system, sans-serif;
}

.gp-title {
    font-size: 18px;
    font-weight: 700;
    color: #111111;
    margin-bottom: 8px;
}

.gp-addr {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.4;
}

/* Kategorien */
.gp-categories {
    font-size: 14px;
    color: #6b7280;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
}

/* Ausstattung Icons */
.gp-features {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 8px;
    font-size: 13px;
    color: #6b7280;
}

.gp-feature {
    display: flex;
    align-items: center;
    gap: 4px;
}

.gp-feature svg {
    width: 16px;
    height: 16px;
    stroke: #6b7280;
    flex-shrink: 0;
}

.gp-divider {
    color: #e5e7eb;
    margin: 0 4px;
    user-select: none;
}

/* Öffnungszeiten */
.gp-line {
    font-size: 14px;
    color: #111111;
    margin-bottom: 6px;
}

.gp-label {
    color: #6b7280;
    font-weight: 500;
}

/* Gutschein Box */
.gp-voucher {
    background: #fef3c7;
    border-left: 3px solid #f59e0b;
    padding: 8px 12px;
    margin: 12px 0;
    font-size: 13px;
    color: #92400e;
    border-radius: 6px;
}

/* Action Buttons */
.gp-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 12px;
}

.gp-btn {
    display: block;
    width: 100%;
    padding: 10px 14px;
    text-align: center;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
}

/* Primary Button - Wichtig: weiße Schrift! */
.gp-btn-primary {
    background: #c03d30;
    color: white !important;
    border: 1px solid #a92e25;
}

.gp-btn-primary:hover {
    background: #a8332a;
    color: white !important;
    text-decoration: none;
}

/* Ghost Button */
.gp-btn-ghost {
    background: white;
    color: #272727;
    border: 1px solid #ddd;
}

.gp-btn-ghost:hover {
    background: #f5f6f7;
    text-decoration: none;
}

/* Leaflet Popup Width */
.leaflet-popup-content {
    margin: 12px !important;
    width: auto !important;
    min-width: 280px;
    max-width: 320px;
}