diff --git a/prototype/superpilot-web/assets/css/superpilot.css b/prototype/superpilot-web/assets/css/superpilot.css new file mode 100644 index 0000000..72d0eb0 --- /dev/null +++ b/prototype/superpilot-web/assets/css/superpilot.css @@ -0,0 +1,1130 @@ +/* ========================================================================== + Superpilot Web — Layout Inspirowany Pracuj.pl (Standard UX/UI 2026) + Spójny z tożsamością TravelLeader Mobile & Travel Manager + ========================================================================== */ + +:root { + /* Paleta barw spójna z aplikacją mobilną */ + --primary: #5c60f5; + --primary-hover: #484cdb; + --primary-light: #eff0fe; + --primary-border: #dadafa; + --dark-navy: #1f2244; + --text-body: #3c4262; + --text-muted: #7e879f; + --text-light: #a9b1c3; + --bg-page: #f5f6fb; + --bg-card: #ffffff; + --border-color: #e5e8f2; + --border-subtle: #edf0f8; + + /* Akcenty */ + --success: #10b981; + --success-light: #ecfdf5; + --success-border: #a7f3d0; + --warning: #f59e0b; + --warning-light: #fffbeb; + --danger: #ef4444; + --danger-light: #fef2f2; + + /* Zaokrąglenia i cienie */ + --radius-sm: 8px; + --radius-md: 14px; + --radius-lg: 20px; + --radius-full: 9999px; + --shadow-subtle: 0 2px 8px rgba(31, 34, 68, 0.04); + --shadow-card: 0 4px 16px rgba(31, 34, 68, 0.05); + --shadow-hover: 0 10px 24px rgba(31, 34, 68, 0.08); +} + +body { + background-color: var(--bg-page) !important; + color: var(--text-body) !important; + font-family: 'Public Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; + -webkit-font-smoothing: antialiased; +} + +/* Brand & Header */ +.brand-superpilot { + display: inline-flex; + align-items: center; + gap: 10px; + font-weight: 700; + font-size: 1.18rem; + color: var(--dark-navy); + letter-spacing: -0.01em; + text-decoration: none; +} + +.brand-superpilot .logo-icon { + width: 34px; + height: 34px; + border-radius: 10px; + background: linear-gradient(135deg, var(--primary) 0%, #767bf7 100%); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.15rem; + box-shadow: 0 2px 8px rgba(92, 96, 245, 0.25); +} + +.btn-sos { + background: #ffffff; + color: #dc2626 !important; + border: 1px solid #fecaca; + font-weight: 600; + font-size: 0.8rem; + border-radius: var(--radius-full); + padding: 6px 14px; + display: inline-flex; + align-items: center; + gap: 6px; + transition: all 0.15s ease; +} + +.btn-sos .sos-dot { + width: 7px; + height: 7px; + border-radius: 50%; + background-color: #ef4444; +} + +.btn-sos:hover { + background: #fef2f2; + border-color: #f87171; + color: #b91c1c !important; +} + +/* ========================================================================== + Wyszukiwarka Główna w Stylu Pracuj.pl (Top Bar z Multiselectem Krajów) + ========================================================================== */ +.search-bar-pracuj { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-lg); + box-shadow: var(--shadow-subtle); + padding: 8px; + margin-bottom: 1.5rem; + display: flex; + align-items: center; +} + +.search-field-item { + flex: 1; + display: flex; + align-items: center; + gap: 10px; + padding: 8px 16px; + position: relative; +} + +.search-field-item:not(:last-child) { + border-right: 1px solid var(--border-color); +} + +.search-field-item .field-icon { + font-size: 1.25rem; + color: var(--text-muted); +} + +.search-field-item .field-content { + flex-grow: 1; + min-width: 0; +} + +.search-field-item .field-label { + font-size: 0.7rem; + font-weight: 700; + text-transform: uppercase; + letter-spacing: 0.04em; + color: var(--text-muted); + margin-bottom: 2px; +} + +.search-field-item input { + border: none; + background: transparent; + padding: 0; + font-size: 0.92rem; + font-weight: 600; + color: var(--dark-navy); + width: 100%; + outline: none; +} + +.search-field-item input::placeholder { + color: #94a3b8; + font-weight: 400; +} + +/* Multiselect Dropdown Trigger w belce */ +.multiselect-dest-trigger { + background: transparent; + border: none; + padding: 0; + font-size: 0.92rem; + font-weight: 600; + color: var(--dark-navy); + width: 100%; + text-align: left; + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + outline: none; +} + +.multiselect-dest-trigger:focus { + outline: none; + box-shadow: none; +} + +.multiselect-dest-trigger .trigger-text { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; +} + +.multiselect-dropdown-menu { + border-radius: var(--radius-md); + border: 1px solid var(--border-color); + box-shadow: var(--shadow-hover); + padding: 10px 12px; + min-width: 280px; + max-height: 320px; + overflow-y: auto; +} + +.multiselect-item-row { + display: flex; + align-items: center; + justify-content: space-between; + padding: 6px 8px; + border-radius: 6px; + cursor: pointer; + font-size: 0.84rem; + font-weight: 500; + color: var(--text-body); + transition: background-color 0.12s ease; +} + +.multiselect-item-row:hover { + background-color: var(--primary-light); + color: var(--primary); +} + +.multiselect-item-row input[type="checkbox"] { + width: 17px; + height: 17px; + border-radius: 4px; + cursor: pointer; + accent-color: var(--primary); +} + +.btn-search-pracuj { + background-color: var(--primary); + color: #ffffff !important; + border: none; + font-weight: 700; + font-size: 0.95rem; + border-radius: var(--radius-md); + padding: 12px 28px; + display: inline-flex; + align-items: center; + gap: 8px; + transition: all 0.15s ease; + white-space: nowrap; +} + +.btn-search-pracuj:hover { + background-color: var(--primary-hover); + box-shadow: 0 4px 14px rgba(92, 96, 245, 0.3); +} + +@media (max-width: 991px) { + .search-bar-pracuj { + flex-direction: column; + padding: 12px; + gap: 8px; + } + .search-field-item { + width: 100%; + border-right: none !important; + border-bottom: 1px solid var(--border-color); + padding: 8px 6px; + } + .btn-search-pracuj { + width: 100%; + justify-content: center; + margin-top: 6px; + } +} + +/* ========================================================================== + Pasek Aktywnych Filtrów (Active Filter Chips nad listą) + ========================================================================== */ +.active-filters-bar { + display: flex; + align-items: center; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 1rem; +} + +.active-filter-chip { + display: inline-flex; + align-items: center; + gap: 5px; + background: #ffffff; + border: 1px solid var(--border-color); + padding: 3px 10px; + border-radius: var(--radius-full); + font-size: 0.76rem; + font-weight: 600; + color: var(--dark-navy); +} + +.active-filter-chip .chip-remove { + cursor: pointer; + color: var(--text-muted); + transition: color 0.15s ease; + font-size: 0.85rem; + line-height: 1; +} + +.active-filter-chip .chip-remove:hover { + color: #ef4444; +} + +/* ========================================================================== + Lewy Panel Filtrów w Stylu Pracuj.pl (Sidebar bez duplikatu krajów) + ========================================================================== */ +.filters-sidebar { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + box-shadow: var(--shadow-subtle); + overflow: hidden; + position: sticky; + top: 80px; +} + +.filter-sidebar-header { + padding: 1rem 1.25rem; + border-bottom: 1px solid var(--border-subtle); + display: flex; + justify-content: space-between; + align-items: center; +} + +.filter-sidebar-title { + font-size: 0.95rem; + font-weight: 700; + color: var(--dark-navy); + margin: 0; + display: flex; + align-items: center; + gap: 8px; +} + +.filter-accordion-item { + border-bottom: 1px solid var(--border-subtle); +} + +.filter-accordion-header { + padding: 0.9rem 1.25rem; + display: flex; + justify-content: space-between; + align-items: center; + cursor: pointer; + user-select: none; + transition: background-color 0.15s ease; +} + +.filter-accordion-header:hover { + background-color: #fafbfe; +} + +.filter-accordion-title { + font-size: 0.86rem; + font-weight: 700; + color: var(--dark-navy); + display: flex; + align-items: center; + gap: 8px; +} + +.filter-accordion-title i { + font-size: 1.1rem; + color: var(--primary); +} + +.filter-accordion-body { + padding: 0.5rem 1.25rem 1rem 1.25rem; + display: flex; + flex-direction: column; + gap: 8px; +} + +.filter-checkbox-row { + display: flex; + align-items: center; + justify-content: space-between; + cursor: pointer; + font-size: 0.82rem; + color: var(--text-body); + margin: 0; +} + +.filter-checkbox-row:hover { + color: var(--primary); +} + +.filter-checkbox-row input[type="checkbox"] { + width: 17px; + height: 17px; + border-radius: 4px; + border: 1.5px solid #cbd5e1; + cursor: pointer; + accent-color: var(--primary); +} + +.filter-count-badge { + font-size: 0.72rem; + color: var(--text-muted); + font-weight: 500; +} + +.filter-sidebar-footer { + padding: 1rem 1.25rem; + background: #ffffff; + border-top: 1px solid var(--border-subtle); +} + +.btn-apply-filters { + background-color: var(--primary); + color: #ffffff !important; + border: none; + font-weight: 700; + font-size: 0.88rem; + border-radius: var(--radius-sm); + padding: 10px 16px; + width: 100%; + display: flex; + align-items: center; + justify-content: center; + gap: 6px; + transition: all 0.15s ease; +} + +.btn-apply-filters:hover { + background-color: var(--primary-hover); + box-shadow: 0 4px 12px rgba(92, 96, 245, 0.25); +} + +/* ========================================================================== + Karty Pilotów w Stylu Pracuj.pl (Czyste, poziome) + ========================================================================== */ +.pilot-offer-card { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + box-shadow: var(--shadow-subtle); + padding: 1.4rem 1.5rem; + margin-bottom: 1rem; + transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1); + position: relative; + display: flex; + gap: 1.25rem; + align-items: flex-start; +} + +.pilot-offer-card:hover { + border-color: var(--primary-border); + box-shadow: var(--shadow-hover); + transform: translateY(-2px); +} + +.pilot-offer-avatar { + width: 58px; + height: 58px; + border-radius: 14px; + background: linear-gradient(135deg, var(--primary) 0%, #767bf7 100%); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 1.35rem; + flex-shrink: 0; + position: relative; +} + +.pilot-offer-avatar .verified-badge-mini { + position: absolute; + bottom: -3px; + right: -3px; + width: 18px; + height: 18px; + border-radius: 50%; + background: var(--success); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.7rem; + border: 2px solid #ffffff; +} + +.pilot-offer-content { + flex-grow: 1; + min-width: 0; +} + +.pilot-offer-header-row { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 12px; + margin-bottom: 2px; +} + +.pilot-offer-name { + font-size: 1.15rem; + font-weight: 700; + color: var(--dark-navy); + line-height: 1.25; + margin: 0; +} + +.pilot-offer-name a { + color: inherit; + text-decoration: none; + transition: color 0.15s ease; +} + +.pilot-offer-name a:hover { + color: var(--primary); +} + +.pilot-offer-headline { + font-size: 0.85rem; + font-weight: 600; + color: var(--text-body); + margin-bottom: 4px; +} + +.pilot-offer-meta-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 12px; + font-size: 0.78rem; + color: var(--text-muted); + margin-bottom: 10px; +} + +.pilot-offer-meta-row .meta-item { + display: inline-flex; + align-items: center; + gap: 4px; +} + +/* Tagi technologii / specjalizacji w stylu Pracuj.pl */ +.pilot-tags-row { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 10px; +} + +.tech-tag { + font-size: 0.74rem; + font-weight: 600; + background: #f1f5f9; + color: #334155; + padding: 3px 10px; + border-radius: 6px; + border: 1px solid #e2e8f0; +} + +.tech-tag.primary-dest { + background: var(--primary-light); + color: var(--primary); + border-color: var(--primary-border); +} + +.pilot-offer-bio { + font-size: 0.82rem; + color: #475569; + line-height: 1.5; + margin-bottom: 12px; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +/* Stopka karty z przyciskami */ +.pilot-offer-footer { + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + gap: 10px; + padding-top: 10px; + border-top: 1px solid var(--border-subtle); +} + +.pilot-academy-badge { + font-size: 0.74rem; + font-weight: 600; + color: var(--primary); + background: var(--primary-light); + padding: 3px 10px; + border-radius: var(--radius-full); + display: inline-flex; + align-items: center; + gap: 4px; +} + +.btn-offer-details { + background: transparent; + color: var(--text-body) !important; + border: 1px solid var(--border-color); + font-weight: 600; + font-size: 0.82rem; + border-radius: var(--radius-sm); + padding: 6px 14px; + display: inline-flex; + align-items: center; + gap: 5px; + transition: all 0.15s ease; + text-decoration: none; +} + +.btn-offer-details:hover { + background: #f8f9fd; + border-color: #cbd5e1; +} + +.btn-offer-book { + background: var(--primary); + color: #ffffff !important; + border: none; + font-weight: 600; + font-size: 0.82rem; + border-radius: var(--radius-sm); + padding: 6px 16px; + display: inline-flex; + align-items: center; + gap: 5px; + transition: all 0.15s ease; +} + +.btn-offer-book:hover { + background: var(--primary-hover); + box-shadow: 0 3px 10px rgba(92, 96, 245, 0.25); +} + +.btn-save-pilot { + background: transparent; + border: none; + color: #cbd5e1; + font-size: 1.3rem; + cursor: pointer; + padding: 2px; + line-height: 1; + transition: color 0.15s ease; +} + +.btn-save-pilot:hover, +.btn-save-pilot.saved { + color: #f59e0b; +} + +/* ========================================================================== + Modal Dialogu Kalendarza (Wybór Zakresu Dat Wycieczki) + ========================================================================== */ +.date-picker-modal .modal-content { + border-radius: var(--radius-lg); + border: none; + box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2); +} + +.date-picker-grid { + display: grid; + grid-template-columns: repeat(7, 1fr); + gap: 4px; + text-align: center; +} + +.date-picker-day-head { + font-size: 0.74rem; + font-weight: 700; + color: var(--text-muted); + padding: 6px 0; +} + +.date-picker-cell { + aspect-ratio: 1; + display: flex; + align-items: center; + justify-content: center; + border-radius: 8px; + font-size: 0.82rem; + font-weight: 600; + cursor: pointer; + transition: all 0.12s ease; + border: 1px solid transparent; +} + +.date-picker-cell:hover:not(.other-month) { + background-color: var(--primary-light); + color: var(--primary); +} + +.date-picker-cell.other-month { + color: #cbd5e1; + cursor: default; +} + +.date-picker-cell.selected-range { + background-color: #eff0fe; + color: var(--primary); + border-radius: 0; +} + +.date-picker-cell.range-start { + background-color: var(--primary) !important; + color: #ffffff !important; + border-top-left-radius: 8px; + border-bottom-left-radius: 8px; +} + +.date-picker-cell.range-end { + background-color: var(--primary) !important; + color: #ffffff !important; + border-top-right-radius: 8px; + border-bottom-right-radius: 8px; +} + +.date-quick-presets { + display: flex; + flex-wrap: wrap; + gap: 6px; + margin-bottom: 12px; +} + +.preset-chip { + font-size: 0.76rem; + font-weight: 600; + background: #f8f9fd; + border: 1px solid var(--border-color); + padding: 4px 10px; + border-radius: var(--radius-full); + cursor: pointer; + transition: all 0.15s ease; +} + +.preset-chip:hover, .preset-chip.active { + background: var(--primary-light); + border-color: var(--primary-border); + color: var(--primary); +} + +/* ========================================================================== + Profil Pilota (pilot-profile.php) — Standard UX/UI 2026 + Spójny z listą ofert i aplikacją mobilną + ========================================================================== */ +.profile-desktop-hero { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-lg); + box-shadow: var(--shadow-subtle); + padding: 1.75rem 2rem; + margin-bottom: 1.5rem; +} + +.profile-hero-top { + display: flex; + justify-content: space-between; + align-items: flex-start; + gap: 1.5rem; + flex-wrap: wrap; +} + +.profile-avatar-large { + width: 76px; + height: 76px; + border-radius: 18px; + background: linear-gradient(135deg, var(--primary) 0%, #767bf7 100%); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-weight: 700; + font-size: 1.75rem; + flex-shrink: 0; + position: relative; + box-shadow: 0 4px 12px rgba(92, 96, 245, 0.2); +} + +.profile-avatar-large .large-verified-badge { + position: absolute; + bottom: -3px; + right: -3px; + width: 22px; + height: 22px; + border-radius: 50%; + background: var(--success); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-size: 0.8rem; + border: 2.5px solid #ffffff; +} + +.profile-name { + font-size: 1.55rem; + font-weight: 700; + color: var(--dark-navy); + margin: 0; + line-height: 1.2; +} + +.profile-badge-available { + background: var(--success-light); + color: #065f46; + border: 1px solid var(--success-border); + font-size: 0.74rem; + font-weight: 600; + padding: 3px 10px; + border-radius: var(--radius-full); + display: inline-flex; + align-items: center; + gap: 5px; +} + +.profile-badge-available .status-dot { + width: 6px; + height: 6px; + border-radius: 50%; + background-color: var(--success); +} + +.profile-meta-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 16px; + font-size: 0.82rem; + color: var(--text-muted); + margin-top: 8px; +} + +.profile-meta-item { + display: inline-flex; + align-items: center; + gap: 5px; +} + +.profile-meta-rating { + background: #fffbeb; + color: #92400e; + border: 1px solid #fde68a; + font-size: 0.8rem; + font-weight: 600; + padding: 3px 10px; + border-radius: var(--radius-full); + display: inline-flex; + align-items: center; + gap: 4px; + text-decoration: none; + transition: all 0.15s ease; +} + +.profile-meta-rating:hover { + background: #fef3c7; + color: #78350f; +} + +.profile-stats-strip { + display: grid; + grid-template-columns: repeat(3, 1fr); + gap: 0.85rem; + padding-top: 1.25rem; + margin-top: 1.25rem; + border-top: 1px solid var(--border-subtle); +} + +.profile-stat-box { + background: #f8f9fd; + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + padding: 0.75rem 1rem; + display: flex; + flex-direction: column; +} + +.profile-stat-box .stat-val { + font-size: 1.15rem; + font-weight: 700; + color: var(--dark-navy); + line-height: 1.2; +} + +.profile-stat-box .stat-lbl { + font-size: 0.74rem; + color: var(--text-muted); + margin-top: 2px; +} + +/* Karty sekcji profilu */ +.profile-section-card { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + box-shadow: var(--shadow-subtle); + margin-bottom: 1.25rem; + overflow: hidden; +} + +.profile-section-header { + display: flex; + justify-content: space-between; + align-items: center; + padding: 1rem 1.4rem; + background: #ffffff; + border-bottom: 1px solid var(--border-subtle); +} + +.profile-section-title { + font-size: 0.95rem; + font-weight: 700; + color: var(--dark-navy); + margin: 0; + display: flex; + align-items: center; + gap: 8px; +} + +.profile-section-title i { + font-size: 1.15rem; + color: var(--primary); +} + +.profile-section-body { + padding: 1.4rem; +} + +/* Języki obce */ +.lang-card { + background: #f8f9fd; + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + padding: 0.75rem 1rem; + display: flex; + align-items: center; + justify-content: space-between; +} + +/* Wideo i Zdjęcia */ +.profile-video-box { + position: relative; + border-radius: var(--radius-md); + overflow: hidden; + height: 200px; + background: linear-gradient(135deg, #1e2244 0%, #0f172a 100%); + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + box-shadow: var(--shadow-subtle); + transition: transform 0.2s ease, box-shadow 0.2s ease; +} + +.profile-video-box:hover { + transform: translateY(-2px); + box-shadow: var(--shadow-hover); +} + +.profile-video-play-btn { + width: 52px; + height: 52px; + border-radius: 50%; + background: var(--primary); + color: #ffffff; + display: flex; + align-items: center; + justify-content: center; + font-size: 1.6rem; + box-shadow: 0 4px 14px rgba(92, 96, 245, 0.4); + transition: transform 0.15s ease; +} + +.profile-video-box:hover .profile-video-play-btn { + transform: scale(1.08); +} + +.profile-photos-grid { + display: grid; + grid-template-columns: repeat(4, 1fr); + gap: 10px; + margin-top: 1rem; +} + +.profile-photo-thumb { + height: 85px; + border-radius: var(--radius-sm); + overflow: hidden; + cursor: pointer; + position: relative; + border: 1px solid var(--border-color); + transition: all 0.2s ease; + display: flex; + align-items: center; + justify-content: center; + color: #ffffff; + font-weight: 600; + font-size: 0.78rem; +} + +.profile-photo-thumb:hover { + transform: translateY(-2px); + box-shadow: var(--shadow-hover); +} + +/* Recenzje i opinie */ +.rating-breakdown-card { + background: #f8f9fd; + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + padding: 1.25rem; +} + +.review-card-item { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-sm); + padding: 1.15rem; + margin-bottom: 0.85rem; + transition: border-color 0.15s ease; +} + +.review-card-item:hover { + border-color: var(--primary-border); +} + +.review-agency-avatar { + width: 36px; + height: 36px; + border-radius: 10px; + background: var(--primary-light); + color: var(--primary); + font-weight: 700; + font-size: 0.82rem; + display: flex; + align-items: center; + justify-content: center; + flex-shrink: 0; +} + +.pilot-reply-box { + background: #f8f9fd; + border-left: 3px solid var(--primary); + border-radius: 0 var(--radius-sm) var(--radius-sm) 0; + padding: 0.75rem 1rem; + margin-top: 0.75rem; +} + +/* Sticky kalendarz w prawej kolumnie */ +.booking-sticky-panel { + position: sticky; + top: 85px; +} + +.calendar-widget-card { + background: #ffffff; + border: 1px solid var(--border-color); + border-radius: var(--radius-md); + box-shadow: var(--shadow-subtle); + padding: 1.25rem; + margin-bottom: 1.25rem; +} + +.sp-calendar-grid { + display: grid; + grid-template-columns: repeat(7, 1fr); + gap: 4px; + text-align: center; +} + +.sp-cal-header { + font-size: 0.72rem; + font-weight: 700; + color: var(--text-muted); + padding: 4px 0; +} + +.sp-cal-day { + aspect-ratio: 1; + display: flex; + flex-direction: column; + align-items: center; + justify-content: center; + border-radius: 6px; + font-size: 0.76rem; + font-weight: 600; + cursor: pointer; + transition: all 0.12s ease; + position: relative; + border: 1px solid transparent; +} + +.sp-cal-day.free { + background: #f8f9fd; + color: var(--dark-navy); + border-color: var(--border-color); +} + +.sp-cal-day.free:hover { + background: var(--success-light); + border-color: var(--success-border); + color: #065f46; +} + +.sp-cal-day.trip { + background: var(--primary-light); + color: var(--primary); + font-weight: 700; + border-color: var(--primary-border); +} + +.sp-cal-day.blocked { + background: #f1f5f9; + color: #94a3b8; + cursor: not-allowed; + text-decoration: line-through; +} + +.sp-cal-day.other-month { + color: #cbd5e1; + cursor: default; +} + +.sp-cal-day.selected { + background: var(--primary) !important; + color: #ffffff !important; + border-color: var(--primary) !important; +} + +.sp-cal-dot { + width: 5px; + height: 5px; + border-radius: 50%; + margin-top: 2px; +} + diff --git a/prototype/superpilot-web/assets/js/superpilot.js b/prototype/superpilot-web/assets/js/superpilot.js new file mode 100644 index 0000000..ff841d2 --- /dev/null +++ b/prototype/superpilot-web/assets/js/superpilot.js @@ -0,0 +1,420 @@ +/** + * Superpilot Web — Logika Wyszukiwarki i Filtrów w Stylu Pracuj.pl + * z Multiselectem Krajów w Górnej Belce oraz Bazą w Lewym Sidebarze + */ + +document.addEventListener('DOMContentLoaded', function () { + initPracujFilters(); + initTopDestMultiselect(); + initDateRangeModal(); + initModals(); +}); + +function initPracujFilters() { + const searchInput = document.getElementById('mainSearchInput'); + const executeBtn = document.getElementById('btnExecuteSearch'); + const sidebarCheckboxes = document.querySelectorAll('.filter-checkbox'); + const clearBtn = document.getElementById('btnClearAllFilters'); + const sidebarCountSpan = document.getElementById('sidebarCountSpan'); + const offersCountText = document.getElementById('offersCountText'); + const noOffersAlert = document.getElementById('noOffersAlert'); + const pilotCards = document.querySelectorAll('.pilot-grid-item'); + + window.currentDateFilter = '16-24-sep-2027'; + + function applyFilters() { + const query = searchInput ? searchInput.value.toLowerCase().trim() : ''; + + // Pobierz zaznaczone kraje z GÓRNEJ BELKI (Multiselect) + const selectedTopDests = Array.from(document.querySelectorAll('.top-dest-checkbox:checked')).map(cb => cb.value.toLowerCase()); + + // Pobierz zaznaczone checkboxy z SIDEBARA (w tym nowa Baza!) + const selectedBases = Array.from(document.querySelectorAll('.filter-checkbox[data-type="base"]:checked')).map(cb => cb.value.toLowerCase()); + const selectedSpecs = Array.from(document.querySelectorAll('.filter-checkbox[data-type="spec"]:checked')).map(cb => cb.value.toLowerCase()); + const selectedLangs = Array.from(document.querySelectorAll('.filter-checkbox[data-type="lang"]:checked')).map(cb => cb.value.toLowerCase()); + const selectedCerts = Array.from(document.querySelectorAll('.filter-checkbox[data-type="cert"]:checked')).map(cb => cb.value.toLowerCase()); + + let visibleCount = 0; + + pilotCards.forEach(card => { + const name = (card.getAttribute('data-name') || '').toLowerCase(); + const base = (card.getAttribute('data-base') || '').toLowerCase(); + const dests = (card.getAttribute('data-destinations') || '').toLowerCase(); + const langs = (card.getAttribute('data-languages') || '').toLowerCase(); + const tags = (card.getAttribute('data-tags') || '').toLowerCase(); + const rating = parseFloat(card.getAttribute('data-rating') || '0'); + const verified = card.getAttribute('data-verified') === '1'; + const kpp = card.getAttribute('data-kpp') === '1'; + const datesFree = (card.getAttribute('data-dates-free') || ''); + + let match = true; + + // 1. Wyszukiwanie tekstowe + if (query && !name.includes(query) && !dests.includes(query) && !tags.includes(query) && !langs.includes(query) && !base.includes(query)) { + match = false; + } + + // 2. Destynacje z Multiselecta u góry + if (selectedTopDests.length > 0) { + const hasAnyDest = selectedTopDests.some(d => dests.includes(d)); + if (!hasAnyDest) match = false; + } + + // 3. Baza wypadowa z sidebara + if (selectedBases.length > 0) { + const hasAnyBase = selectedBases.some(b => base.includes(b)); + if (!hasAnyBase) match = false; + } + + // 4. Specjalizacje z sidebara + if (selectedSpecs.length > 0) { + const hasAnySpec = selectedSpecs.some(s => tags.includes(s)); + if (!hasAnySpec) match = false; + } + + // 5. Języki z sidebara + if (selectedLangs.length > 0) { + const hasAnyLang = selectedLangs.some(l => langs.includes(l)); + if (!hasAnyLang) match = false; + } + + // 6. Certyfikaty z sidebara + if (selectedCerts.includes('verified') && !verified) match = false; + if (selectedCerts.includes('kpp') && !kpp) match = false; + if (selectedCerts.includes('rating-48') && rating < 4.8) match = false; + + // 7. Kalendarz + if (window.currentDateFilter === '16-24-sep-2027') { + if (!datesFree.includes('16-24-sep') && name !== 'oskar kaczmarek') { + match = false; + } + } else if (window.currentDateFilter === '05-15-sep-2027') { + if (!datesFree.includes('05-15-sep')) { + match = false; + } + } else if (window.currentDateFilter === 'październik-2027') { + if (!datesFree.includes('październik-2027')) { + match = false; + } + } + + if (match) { + card.style.display = 'flex'; + visibleCount++; + } else { + card.style.display = 'none'; + } + }); + + // Aktualizacja liczników + if (sidebarCountSpan) sidebarCountSpan.innerText = visibleCount; + if (offersCountText) offersCountText.innerText = visibleCount + (visibleCount === 1 ? ' oferta' : (visibleCount >= 2 && visibleCount <= 4 ? ' oferty' : ' ofert')); + if (noOffersAlert) noOffersAlert.style.display = (visibleCount === 0) ? 'block' : 'none'; + + // Aktualizacja paska aktywnych filtrów (Chips) + updateActiveFilterChips(selectedTopDests, selectedBases); + } + + if (searchInput) searchInput.addEventListener('input', applyFilters); + if (executeBtn) executeBtn.addEventListener('click', applyFilters); + + sidebarCheckboxes.forEach(cb => { + cb.addEventListener('change', applyFilters); + }); + + const applySidebarBtn = document.getElementById('btnApplySidebarFilters'); + if (applySidebarBtn) { + applySidebarBtn.addEventListener('click', function () { + applyFilters(); + window.scrollTo({ top: 0, behavior: 'smooth' }); + }); + } + + if (clearBtn) { + clearBtn.addEventListener('click', function () { + if (searchInput) searchInput.value = ''; + sidebarCheckboxes.forEach(cb => cb.checked = false); + document.querySelectorAll('.top-dest-checkbox').forEach(cb => cb.checked = false); + updateDestTriggerLabel(); + window.currentDateFilter = 'all'; + const display = document.getElementById('selectedDateDisplay'); + if (display) display.value = 'Dowolny termin'; + applyFilters(); + }); + } + + // Obsługa usunięcia chipa bazy + const removeBaseChip = document.getElementById('removeBaseChip'); + if (removeBaseChip) { + removeBaseChip.addEventListener('click', function () { + document.querySelectorAll('.filter-checkbox[data-type="base"]').forEach(cb => cb.checked = false); + applyFilters(); + }); + } + + window.triggerSuperpilotFilter = applyFilters; +} + +function initTopDestMultiselect() { + const destCheckboxes = document.querySelectorAll('.top-dest-checkbox'); + const triggerText = document.getElementById('destTriggerText'); + const resetBtn = document.getElementById('btnResetDestMultiselect'); + const confirmBtn = document.getElementById('btnConfirmDestDropdown'); + + function updateLabel() { + const checked = Array.from(document.querySelectorAll('.top-dest-checkbox:checked')).map(cb => cb.value); + if (!triggerText) return; + + if (checked.length === 0) { + triggerText.innerText = 'Wszystkie kraje'; + triggerText.style.color = '#94a3b8'; + } else if (checked.length === 1) { + const flag = getCountryFlag(checked[0]); + triggerText.innerText = flag + ' ' + checked[0]; + triggerText.style.color = 'var(--dark-navy)'; + } else if (checked.length === 2) { + triggerText.innerText = checked.map(c => getCountryFlag(c) + ' ' + c).join(', '); + triggerText.style.color = 'var(--dark-navy)'; + } else { + triggerText.innerText = getCountryFlag(checked[0]) + ' ' + checked[0] + ' (+' + (checked.length - 1) + ' inne)'; + triggerText.style.color = 'var(--dark-navy)'; + } + + if (window.triggerSuperpilotFilter) window.triggerSuperpilotFilter(); + } + + window.updateDestTriggerLabel = updateLabel; + + destCheckboxes.forEach(cb => { + cb.addEventListener('change', updateLabel); + }); + + if (resetBtn) { + resetBtn.addEventListener('click', function () { + destCheckboxes.forEach(cb => cb.checked = false); + updateLabel(); + }); + } + + if (confirmBtn) { + confirmBtn.addEventListener('click', function () { + const dropdownEl = document.getElementById('destDropdownTrigger'); + const dropdown = bootstrap.Dropdown.getInstance(dropdownEl); + if (dropdown) dropdown.hide(); + }); + } + + const removeDestChip = document.getElementById('removeDestChip'); + if (removeDestChip) { + removeDestChip.addEventListener('click', function () { + destCheckboxes.forEach(cb => cb.checked = false); + updateLabel(); + }); + } +} + +function updateActiveFilterChips(selectedDests, selectedBases) { + const chipDest = document.getElementById('chipDestFilter'); + const chipDestText = document.getElementById('chipDestText'); + const chipDate = document.getElementById('chipDateFilter'); + const chipDateText = document.getElementById('chipDateText'); + const chipBase = document.getElementById('chipBaseFilter'); + const chipBaseText = document.getElementById('chipBaseText'); + + if (chipDest && chipDestText) { + if (selectedDests && selectedDests.length > 0) { + chipDest.style.display = 'inline-flex'; + chipDestText.innerText = selectedDests.map(d => capitalize(d)).join(', '); + } else { + chipDest.style.display = 'none'; + } + } + + if (chipDate && chipDateText) { + if (window.currentDateFilter && window.currentDateFilter !== 'all') { + chipDate.style.display = 'inline-flex'; + if (window.currentDateFilter === '16-24-sep-2027') chipDateText.innerText = '16–24.09.2027'; + else if (window.currentDateFilter === '05-15-sep-2027') chipDateText.innerText = '05–15.09.2027'; + else if (window.currentDateFilter === 'październik-2027') chipDateText.innerText = 'Październik 2027'; + } else { + chipDate.style.display = 'none'; + } + } + + if (chipBase && chipBaseText) { + if (selectedBases && selectedBases.length > 0) { + chipBase.style.display = 'inline-flex'; + chipBaseText.innerText = 'Baza: ' + selectedBases.map(b => capitalize(b)).join(', '); + } else { + chipBase.style.display = 'none'; + } + } +} + +function initDateRangeModal() { + const presets = document.querySelectorAll('.preset-chip'); + const selectedText = document.getElementById('modalSelectedDateText'); + const displayInput = document.getElementById('selectedDateDisplay'); + const resetDateBtn = document.getElementById('btnResetDateDialog'); + const applyDateBtn = document.getElementById('btnApplyDateDialog'); + const removeDateChip = document.getElementById('removeDateChip'); + + presets.forEach(p => { + p.addEventListener('click', function () { + presets.forEach(item => item.classList.remove('active')); + this.classList.add('active'); + + const presetVal = this.getAttribute('data-preset'); + window.currentDateFilter = presetVal; + + if (presetVal === '16-24-sep-2027') { + selectedText.innerText = '16.09.2027 – 24.09.2027 (Wycieczka #12)'; + displayInput.value = '16.09.2027 – 24.09.2027'; + } else if (presetVal === '05-15-sep-2027') { + selectedText.innerText = '05.09.2027 – 15.09.2027 (Wolne okienko)'; + displayInput.value = '05.09.2027 – 15.09.2027'; + } else if (presetVal === 'październik-2027') { + selectedText.innerText = '01.10.2027 – 31.10.2027 (Październik)'; + displayInput.value = 'Październik 2027'; + } else { + selectedText.innerText = 'Dowolny termin'; + displayInput.value = 'Dowolny termin'; + } + }); + }); + + if (resetDateBtn) { + resetDateBtn.addEventListener('click', function () { + presets.forEach(item => item.classList.remove('active')); + const allPreset = document.querySelector('.preset-chip[data-preset="all"]'); + if (allPreset) allPreset.classList.add('active'); + window.currentDateFilter = 'all'; + selectedText.innerText = 'Dowolny termin'; + displayInput.value = 'Dowolny termin'; + if (window.triggerSuperpilotFilter) window.triggerSuperpilotFilter(); + const modalEl = document.getElementById('dateRangeModal'); + const modalInstance = bootstrap.Modal.getInstance(modalEl); + if (modalInstance) modalInstance.hide(); + }); + } + + if (applyDateBtn) { + applyDateBtn.addEventListener('click', function () { + if (window.triggerSuperpilotFilter) window.triggerSuperpilotFilter(); + }); + } + + if (removeDateChip) { + removeDateChip.addEventListener('click', function () { + window.currentDateFilter = 'all'; + displayInput.value = 'Dowolny termin'; + if (window.triggerSuperpilotFilter) window.triggerSuperpilotFilter(); + }); + } +} + +function initModals() { + window.openBookingModal = function (pilotId, pilotName, dates) { + const modal = new bootstrap.Modal(document.getElementById('bookingModal')); + const nameInput = document.getElementById('bookingPilotName'); + const nameDisplay = document.getElementById('bookingPilotNameDisplay'); + const idInput = document.getElementById('bookingPilotId'); + const datesInput = document.getElementById('bookingDates'); + + const name = pilotName || 'Oskar Kaczmarek'; + if (nameInput) nameInput.value = name; + if (nameDisplay) nameDisplay.innerText = name; + if (idInput) idInput.value = pilotId || '1'; + if (datesInput && dates) datesInput.value = dates; + + modal.show(); + }; + + window.openSosModal = function (defaultCountry) { + const modal = new bootstrap.Modal(document.getElementById('sosModal')); + if (defaultCountry && document.getElementById('sosCountrySelect')) { + document.getElementById('sosCountrySelect').value = defaultCountry; + } + modal.show(); + }; + + const bookingForm = document.getElementById('pilotBookingForm'); + if (bookingForm) { + bookingForm.addEventListener('submit', function (e) { + e.preventDefault(); + const submitBtn = bookingForm.querySelector('button[type="submit"]'); + const pilotName = document.getElementById('bookingPilotName').value; + const originalText = submitBtn.innerHTML; + + submitBtn.disabled = true; + submitBtn.innerHTML = " Wysyłanie powiadomienia PUSH..."; + + setTimeout(() => { + submitBtn.disabled = false; + submitBtn.innerHTML = originalText; + const modalEl = document.getElementById('bookingModal'); + const modalInstance = bootstrap.Modal.getInstance(modalEl); + if (modalInstance) modalInstance.hide(); + + showToastNotification( + 'Pomyślnie wysłano zapytanie!', + 'Powiadomienie PUSH trafiło do aplikacji mobilnej pilota (' + pilotName + '). Pilot ma 24h na akceptację w aplikacji.' + ); + }, 900); + }); + } +} + +function showToastNotification(title, message) { + let container = document.getElementById('toastContainer'); + if (!container) { + container = document.createElement('div'); + container.id = 'toastContainer'; + container.style.position = 'fixed'; + container.style.top = '24px'; + container.style.right = '24px'; + container.style.zIndex = '99999'; + document.body.appendChild(container); + } + + const toast = document.createElement('div'); + toast.className = 'toast show align-items-center text-white bg-dark border-0 mb-2 shadow-lg'; + toast.style.minWidth = '340px'; + toast.style.borderRadius = '12px'; + toast.style.overflow = 'hidden'; + toast.innerHTML = ` +
+ Podnoś jakość kadr wyjazdowych. Piloci z certyfikatami Superpilot Academy otrzymują odznakę zaufania, wyższą pozycję w wyszukiwarce biur oraz ubezpieczenie OC pilotażu. +
++ Praktyczny certyfikat pilotażu tras autokarowych i lotniczych we Włoszech, Grecji i Hiszpanii. Standardy Magico i TravelManager. +
+ ++ Państwowy kurs pierwszej pomocy dla pilotów wycieczek szkolnych, trekkingowych i autokarowych. Egzamin państwowy z tytułem Ratownika. +
+ ++ Etykieta biznesowa, dyplomacja w hotelach 5*, obsługa zarządów korporacji i eventów zagranicznych. Najwyższe stawki dzienne w branży. +
+ +