/* g03-profile.css - Driver profile page */
.page--profile .main-content { max-width: 1600px; padding: 12px clamp(12px, 2vw, 24px) 40px; margin: 0 auto; }
.page--profile .breadcrumb { margin-bottom: 14px; font-size: .88rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page--profile .breadcrumb a { color: var(--text-secondary); text-decoration: none; }
.page--profile .breadcrumb a:hover { color: var(--primary); }
.page--profile .breadcrumb__sep { color: var(--border); font-size: .75rem; }
.page--profile .breadcrumb > span:last-child { color: var(--text); font-weight: 600; }

.profile-hero { position: relative; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 28px; box-shadow: var(--shadow-md); }
.profile-hero__cover { height: 200px; position: relative; }
.profile-hero__cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-hero__cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(4,41,77,0.25) 0%, rgba(4,41,77,0.85) 100%); }
.profile-hero__bar { position: relative; background: linear-gradient(135deg, var(--secondary), #16203a); padding: 0 32px 24px; display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "avatar id cta" "stats stats stats"; gap: 8px 24px; align-items: end; }
.profile-hero__avatar { grid-area: avatar; width: 132px; height: 132px; border-radius: 24px; object-fit: cover; border: 5px solid var(--white); box-shadow: 0 12px 30px rgba(0,0,0,0.3); margin-top: -66px; flex-shrink: 0; position: relative; z-index: 2; background: var(--bg); }
.profile-hero__id { grid-area: id; min-width: 0; padding-bottom: 4px; color: var(--white); }
.profile-hero__name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.profile-hero__name h1 { font-size: 1.85rem; font-weight: 800; color: var(--white); margin: 0; }
.profile-hero__meta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; font-size: .9rem; color: rgba(255,255,255,0.8); }
.profile-hero__meta span { display: inline-flex; align-items: center; gap: 6px; }
.profile-hero__meta i { color: var(--primary); }
.profile-hero__meta .stars { color: var(--gold); }
.profile-hero__cta { grid-area: cta; padding-bottom: 6px; display: flex; gap: 10px; flex-wrap: wrap; }

.profile-stats { grid-area: stats; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 0; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); border-radius: var(--radius-md); overflow: hidden; }
.profile-stat { flex: 1; min-width: 110px; padding: 12px 20px; text-align: center; border-inline-start: 1px solid rgba(255,255,255,0.1); }
.profile-stat:first-child { border-inline-start: none; }
.profile-stat b { display: block; font-family: var(--font-number); font-size: 1.5rem; font-weight: 800; color: var(--white); line-height: 1.1; }
.profile-stat b .u { font-size: .9rem; color: var(--primary); }
.profile-stat span { font-size: .72rem; color: rgba(255,255,255,0.65); font-weight: 600; }

.profile-layout { display: grid; grid-template-columns: 1fr 350px; gap: 28px; align-items: start; }

.profile-tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.profile-tabs__item { padding: 10px 18px; font-size: .88rem; font-weight: 600; cursor: pointer; border: 1.5px solid var(--border); background: var(--white); color: var(--text-secondary); border-radius: 999px; transition: all .2s; display: flex; align-items: center; gap: 7px; }
.profile-tabs__item i { font-size: .85rem; }
.profile-tabs__item:hover { border-color: var(--primary); color: var(--primary); }
.profile-tabs__item--active { background: var(--primary); border-color: var(--primary); color: var(--white); box-shadow: 0 4px 12px rgba(var(--primary-rgb),0.28); }
.profile-tab-content { display: none; animation: fadeIn .3s ease; }
.profile-tab-content--active { display: block; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.section-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px; box-shadow: var(--shadow-sm); }
.section-card__title { font-size: 1.15rem; margin-bottom: 20px; display: flex; align-items: center; gap: 12px; font-weight: 700; color: var(--secondary); }
.section-card__title .ic { width: 38px; height: 38px; border-radius: 11px; background: rgba(var(--primary-rgb),0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 1rem; flex-shrink: 0; }

.bio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.bio-item { background: var(--bg); border-radius: var(--radius-md); padding: 16px; border: 1px solid var(--border-light); }
.bio-item__label { font-size: .75rem; color: var(--text-secondary); font-weight: 600; margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.bio-item__label i { color: var(--primary); }
.bio-item__value { font-size: .95rem; font-weight: 700; color: var(--text); }
.bio-item--wide { grid-column: 1/-1; }
.bio-item--wide .bio-item__value { font-weight: 500; line-height: 1.7; color: var(--text-secondary); }

.vehicle-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.veh { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); overflow: hidden; transition: all .25s; }
.veh:hover { border-color: var(--primary); box-shadow: var(--shadow-md); transform: translateY(-3px); }
.veh__img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg); }
.veh__body { padding: 16px; }
.veh__body h4 { font-size: 1rem; margin-bottom: 10px; }
.veh__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.veh__tag { font-size: .75rem; background: var(--bg); border-radius: 6px; padding: 4px 10px; color: var(--text-secondary); }

.gallery-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.gallery-item { border-radius: 14px; overflow: hidden; position: relative; cursor: pointer; transition: transform .3s ease, box-shadow .3s ease; }
.gallery-item:hover { transform: scale(1.02); box-shadow: var(--shadow-lg); }
.gallery-item img { width: 100%; height: 175px; object-fit: cover; display: block; transition: transform .4s ease; background: var(--bg); }
.gallery-item:hover img { transform: scale(1.09); }
.gallery-item__caption { position: absolute; bottom: 0; left: 0; right: 0; background: linear-gradient(transparent, rgba(0,0,0,0.75)); color: #fff; padding: 30px 12px 12px; font-size: .85rem; font-weight: 600; }

.review-card { padding: 18px 0; border-bottom: 1px solid var(--border-light); }
.review-card:last-child { border-bottom: none; padding-bottom: 0; }
.review-card:first-child { padding-top: 0; }
.review-card__header { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.review-card__header img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.review-card__user { font-weight: 700; font-size: .92rem; }
.review-card__date { font-size: .78rem; color: var(--text-secondary); margin-inline-start: auto; white-space: nowrap; }
.review-card .stars { color: var(--gold); font-size: .85rem; }
.review-card p { font-size: .88rem; color: var(--text-secondary); line-height: 1.8; margin: 0; }

.hours-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.hours-card { background: var(--bg); border-radius: var(--radius-md); padding: 13px 16px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--border-light); }
.hours-card__day { font-weight: 700; font-size: .9rem; color: var(--text); }
.hours-card__time { font-size: .85rem; color: var(--text-secondary); font-family: var(--font-number); }
.hours-card--off { opacity: .6; }
.hours-card--off .hours-card__time { color: var(--danger); font-family: inherit; }
.hours-note { margin-top: 16px; padding: 13px 16px; background: rgba(var(--primary-rgb),0.08); border-radius: var(--radius-md); font-size: .85rem; color: var(--text-secondary); display: flex; align-items: center; gap: 8px; }
.hours-note i { color: var(--primary); }

.side-col { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }
.order-panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); overflow: hidden; }
.order-panel__header { padding: 16px 20px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: var(--white); display: flex; align-items: center; gap: 10px; font-weight: 700; }
.order-panel__body { padding: 20px; }
.order-panel .form-group { margin-bottom: 14px; }
.order-panel label { display: block; font-weight: 600; font-size: .82rem; margin-bottom: 6px; color: var(--secondary); }
.order-panel input, .order-panel select, .order-panel textarea { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-family: inherit; font-size: .88rem; color: var(--text); background: var(--bg); transition: all var(--transition); box-sizing: border-box; }
.order-panel input:focus, .order-panel select:focus, .order-panel textarea:focus { outline: none; border-color: var(--primary); background: var(--white); box-shadow: 0 0 0 3px rgba(var(--primary-rgb),0.12); }
.order-panel__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.contact-card { background: linear-gradient(135deg, var(--secondary), #16203a); color: var(--white); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm); }
.contact-card h4 { color: var(--white); font-size: 1rem; margin-bottom: 14px; }
.contact-card__row { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: .88rem; color: rgba(255,255,255,0.85); }
.contact-card__row i { width: 34px; height: 34px; border-radius: 9px; background: rgba(255,255,255,0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.contact-card__btn { margin-top: 14px; width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; padding: 11px 24px; background: var(--primary); color: #fff; border-radius: 10px; font-weight: 700; text-decoration: none; transition: all .2s; box-sizing: border-box; }
.contact-card__btn:hover { background: var(--primary-dark, #d9550a); }

/* Chat popup */
.chat-popup { position: fixed; bottom: 24px; left: 24px; width: 360px; max-height: 500px; background: #fff; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.2); z-index: 9999; display: none; flex-direction: column; overflow: hidden; direction: rtl; }
.chat-popup--open { display: flex; }
.chat-popup .chat-header { background: var(--primary); color: #fff; padding: 14px 16px; display: flex; align-items: center; gap: 10px; }
.chat-popup .chat-header img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; background: var(--bg); }
.chat-popup .chat-header span { font-weight: 700; }
.chat-close { margin-right: auto; background: none; border: none; color: #fff; font-size: 1.3rem; cursor: pointer; line-height: 1; }
.chat-body { padding: 16px; flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; min-height: 240px; max-height: 320px; }
.chat-msg { padding: 10px 14px; border-radius: 14px; max-width: 80%; font-size: .88rem; line-height: 1.5; }
.chat-msg--received { background: #f1f3f5; align-self: flex-start; border-bottom-right-radius: 4px; }
.chat-msg--sent { background: var(--primary); color: #fff; align-self: flex-end; border-bottom-left-radius: 4px; }
.chat-footer { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid #eee; }
.chat-footer input { flex: 1; padding: 10px 14px; border: 1px solid #ddd; border-radius: 24px; outline: none; font-family: inherit; font-size: .88rem; }
.chat-footer button { background: var(--primary); color: #fff; border: none; border-radius: 50%; width: 40px; height: 40px; cursor: pointer; flex-shrink: 0; font-size: 1rem; }

@media (max-width: 992px) {
  .profile-layout { grid-template-columns: 1fr; }
  .side-col { position: static; }
}
@media (max-width: 768px) {
  .profile-hero__bar { padding: 0 18px 20px; text-align: center; grid-template-columns: 1fr; grid-template-areas: "avatar" "id" "cta" "stats"; justify-items: center; }
  .profile-hero__avatar { margin-top: -60px; width: 100px; height: 100px; }
  .profile-hero__meta { justify-content: center; }
  .profile-hero__cta { width: 100%; }
  .profile-hero__cta .btn { flex: 1; justify-content: center; }
  .bio-grid { grid-template-columns: 1fr 1fr; }
  .vehicle-list { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .chat-popup { width: calc(100% - 32px); left: 16px; bottom: 16px; max-height: 70vh; }
  .hours-grid { grid-template-columns: 1fr; }
  .profile-stat { padding: 12px 16px; }
}
@media (max-width: 480px) {
  .bio-grid { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr; }
  .order-panel__row { grid-template-columns: 1fr; }
}
