/*
 * OASIS NETWORK – GEWERBE PAGE STYLES
 */

/* ================================================
   GEWERBE PAGE WRAPPER
   ================================================ */

.gewerbe-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--bg);
    overflow: hidden;
}

/* ================================================
   FILTER / TOPBAR
   ================================================ */

.gewerbe-filterbar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 28px;
    background: var(--sidebar-bg);
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
    flex-wrap: wrap;
    position: relative;
}

.filter-search-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    padding: 0 14px;
    min-width: 200px;
    transition: border-color var(--trans);
}

.filter-search-wrap:focus-within {
    border-color: var(--accent-glow);
}

.filter-search-wrap i {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.filter-search-wrap input {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.87rem;
    padding: 10px 0;
    width: 100%;
}

.filter-search-wrap input::placeholder {
    color: var(--text-dim);
}

.filter-select-wrap {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.filter-select-wrap label {
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    padding-left: 2px;
}

.filter-select {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 0.87rem;
    padding: 8px 32px 8px 12px;
    cursor: pointer;
    outline: none;
    min-width: 160px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    transition: border-color var(--trans);
}

.filter-select:focus {
    border-color: var(--accent-glow);
}

.filter-select option {
    background: var(--bg-card);
}

.gewerbe-filterbar-center {
    margin-left: auto;
}

.btn-beantragen {
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 9px 20px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all var(--trans);
    white-space: nowrap;
}

.btn-beantragen:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 16px var(--accent-glow);
}

/* ================================================
   BUSINESS GRID
   ================================================ */

.gewerbe-grid-wrap {
    flex: 1;
    overflow-y: auto;
    padding: 28px;
}

.gewerbe-grid-wrap::-webkit-scrollbar { width: 6px; }
.gewerbe-grid-wrap::-webkit-scrollbar-track { background: transparent; }
.gewerbe-grid-wrap::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.gewerbe-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

@media (max-width: 1400px) { .gewerbe-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1000px) { .gewerbe-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .gewerbe-grid { grid-template-columns: 1fr; } }

/* ================================================
   BUSINESS CARD
   ================================================ */

.business-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--trans);
    display: flex;
    flex-direction: column;
    animation: fade-in 0.3s ease forwards;
}

.business-card:hover {
    border-color: rgba(255,255,255,0.14);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.5);
}

.business-card:hover .card-banner-img {
    transform: scale(1.04);
}

/* Banner */
.card-banner {
    position: relative;
    width: 100%;
    height: 160px;
    overflow: hidden;
    flex-shrink: 0;
}

.card-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Gradient banner fallback */
.card-banner-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: rgba(255,255,255,0.7);
    transition: transform 0.4s ease;
}

.card-banner::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.6) 0%, transparent 60%);
    pointer-events: none;
}

/* Star rating badge on banner */
.card-rating-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: 0.78rem;
    font-weight: 700;
    color: #FFD700;
    z-index: 2;
}

.card-rating-badge .stars-mini i {
    font-size: 0.65rem;
}

/* Favorite button */
.card-fav-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    border: none;
    border-radius: 50%;
    color: rgba(255,255,255,0.6);
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans);
    z-index: 2;
}

.card-fav-btn:hover, .card-fav-btn.active {
    color: #e11d48;
    background: rgba(0,0,0,0.75);
}

/* Card body */
.card-body {
    padding: 14px 16px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

.card-name {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.card-tagline {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Feature tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 50px;
    letter-spacing: 0.3px;
}

.tag-palmpoints {
    background: rgba(255,184,76,0.15);
    border: 1px solid rgba(255,184,76,0.35);
    color: var(--accent);
}

.tag-delivery {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
}

.tag-leitstelle-on {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
}

.tag-leitstelle-off {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}

/* Card footer */
.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid var(--glass-border);
}

.card-category {
    font-size: 0.72rem;
    color: var(--text-dim);
    font-weight: 500;
}

.btn-mehr {
    background: var(--accent-dim);
    border: 1px solid var(--accent-glow);
    color: var(--accent);
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--trans);
    white-space: nowrap;
}

.btn-mehr:hover {
    background: var(--accent);
    color: #0a0d1e;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* Contact icons row */
.card-contact-icons {
    display: flex;
    align-items: center;
    gap: 8px;
}

.contact-circle {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    border: none;
    cursor: pointer;
    transition: all var(--trans);
}

.cc-phone  { background: rgba(34,197,94,0.18); color: #22c55e; }
.cc-email  { background: rgba(99,102,241,0.18); color: #818cf8; }
.cc-web    { background: rgba(56,189,248,0.18); color: #38bdf8; }

.contact-circle:hover { transform: scale(1.12); filter: brightness(1.2); }

/* No results */
.no-results {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
    grid-column: 1 / -1;
}

.no-results i {
    font-size: 3rem;
    margin-bottom: 16px;
    display: block;
    opacity: 0.3;
}

/* ================================================
   DETAIL OVERLAY
   ================================================ */

.gewerbe-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    z-index: 500;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.gewerbe-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.gewerbe-detail {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 860px;
    max-width: 95vw;
    background: var(--bg-mid);
    border-left: 1px solid var(--glass-border);
    z-index: 600;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.gewerbe-detail.open {
    transform: translateX(0);
}

/* Detail Hero */
.detail-hero {
    position: relative;
    height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}

.detail-hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.detail-hero-gradient {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255,255,255,0.3);
}

.detail-hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.detail-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, var(--bg-mid) 0%, transparent 60%);
    pointer-events: none;
}

.detail-close-btn {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 34px;
    height: 34px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 50%;
    color: var(--text);
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--trans);
    z-index: 2;
}

.detail-close-btn:hover {
    background: rgba(255,255,255,0.1);
    transform: rotate(90deg);
}

/* Detail header (below hero) */
.detail-header {
    padding: 0 28px 20px;
    flex-shrink: 0;
    border-bottom: 1px solid var(--glass-border);
}

.detail-title-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.detail-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.detail-category {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.detail-rating-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.stars-large i {
    font-size: 1.05rem;
    color: #FFD700;
}

.stars-large i.empty { color: rgba(255,255,255,0.15); }

.detail-rating-score {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text);
}

.detail-review-count {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.detail-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 12px;
}

/* Tabs */
.detail-tabs {
    display: flex;
    gap: 0;
    padding: 0 28px;
    border-bottom: 1px solid var(--glass-border);
    flex-shrink: 0;
}

.detail-tab {
    padding: 14px 20px;
    font-size: 0.87rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all var(--trans);
    white-space: nowrap;
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: 'Inter', sans-serif;
}

.detail-tab:hover { color: var(--text); }
.detail-tab.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Tab panels */
.detail-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 40px;
}

.detail-body::-webkit-scrollbar { width: 6px; }
.detail-body::-webkit-scrollbar-track { background: transparent; }
.detail-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* Übersicht: 2-col layout */
.overview-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
}

@media (max-width: 700px) { .overview-layout { grid-template-columns: 1fr; } }

.overview-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.7;
}

/* Contact card */
.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.contact-card-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.contact-row {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.88rem;
}

.contact-row i {
    width: 18px;
    color: var(--text-dim);
    text-align: center;
    flex-shrink: 0;
}

.contact-row a {
    color: var(--text);
    text-decoration: none;
    transition: color var(--trans);
}

.contact-row a:hover { color: var(--accent); }

.leitstelle-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 50px;
}

.leitstelle-pill .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.leitstelle-pill.on {
    background: rgba(34,197,94,0.12);
    border: 1px solid rgba(34,197,94,0.3);
    color: #22c55e;
}
.leitstelle-pill.on .dot {
    background: #22c55e;
    box-shadow: 0 0 6px #22c55e;
    animation: blink 1.4s ease-in-out infinite;
}
.leitstelle-pill.off {
    background: rgba(239,68,68,0.1);
    border: 1px solid rgba(239,68,68,0.25);
    color: #ef4444;
}
.leitstelle-pill.off .dot { background: #ef4444; }

/* Rating Breakdown */
.rating-breakdown {
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    padding: 20px;
    margin-top: 20px;
}

.rating-breakdown-title {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 14px;
}

.rb-score {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.rb-big {
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.rb-stars { display: flex; gap: 4px; }
.rb-stars i { font-size: 1rem; color: #FFD700; }

.rb-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 0.8rem;
}

.rb-star-label {
    color: var(--text-muted);
    width: 20px;
    text-align: right;
    flex-shrink: 0;
}

.rb-bar-track {
    flex: 1;
    height: 6px;
    background: rgba(255,255,255,0.06);
    border-radius: 3px;
    overflow: hidden;
}

.rb-bar-fill {
    height: 100%;
    background: #FFD700;
    border-radius: 3px;
    transition: width 0.6s ease;
}

.rb-count {
    width: 24px;
    text-align: right;
    color: var(--text-dim);
    flex-shrink: 0;
}

/* ================================================
   REVIEWS TAB
   ================================================ */

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.review-item {
    display: flex;
    gap: 14px;
    padding: 18px 0;
    border-bottom: 1px solid var(--glass-border);
    animation: fade-in 0.3s ease forwards;
}

.review-item:last-child { border-bottom: none; }

.review-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
    background: var(--bg-card);
    border: 2px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--text-muted);
}

.review-body { flex: 1; }

.review-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.review-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text);
}

.review-date {
    font-size: 0.75rem;
    color: var(--text-dim);
}

.review-stars i { font-size: 0.75rem; color: #FFD700; }
.review-stars i.empty { color: rgba(255,255,255,0.15); }

.review-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-top: 6px;
}

.btn-review-create {
    display: block;
    width: 100%;
    padding: 11px;
    background: transparent;
    border: 1px solid var(--accent-glow);
    border-radius: var(--radius-sm);
    color: var(--accent);
    font-family: 'Inter', sans-serif;
    font-size: 0.87rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans);
    margin-bottom: 20px;
    text-align: center;
}

.btn-review-create:hover {
    background: var(--accent-dim);
    box-shadow: 0 0 16px var(--accent-glow);
}
