/* CNC Padel v4.3 hotfix
   Mobil görünüm, SVG ikon, alt menü ve kart taşma düzeltmeleri
*/

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  background: #eef5ff;
  padding-bottom: 105px !important;
}

img {
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page,
.app,
.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  overflow-x: hidden;
  padding-bottom: 110px;
}

/* ======================================================
   BOTTOM NAVIGATION - FINAL
====================================================== */

.bottom-nav {
  position: fixed !important;
  left: 50% !important;
  bottom: 14px !important;
  transform: translateX(-50%) !important;
  width: calc(100% - 28px) !important;
  max-width: 430px !important;
  height: 78px !important;
  padding: 0 10px !important;
  background: rgba(255, 255, 255, .96) !important;
  backdrop-filter: blur(18px) !important;
  -webkit-backdrop-filter: blur(18px) !important;
  border-radius: 32px !important;
  box-shadow: 0 18px 45px rgba(9, 27, 77, .18) !important;
  display: grid !important;
  grid-template-columns: 1fr 1fr 76px 1fr 1fr !important;
  align-items: center !important;
  z-index: 999999 !important;
  border: 1px solid rgba(229, 237, 248, .95) !important;
}

.bottom-nav a {
  width: 100% !important;
  height: 66px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 5px !important;
  text-decoration: none !important;
  color: #64748b !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
}

.bottom-nav a svg {
  width: 22px !important;
  height: 22px !important;
  min-width: 22px !important;
  min-height: 22px !important;
  display: block !important;
  fill: none !important;
  stroke: currentColor !important;
  stroke-width: 2.3 !important;
  stroke-linecap: round !important;
  stroke-linejoin: round !important;
}

.bottom-nav a span {
  display: block !important;
  font-size: 11px !important;
  line-height: 1 !important;
  font-weight: 800 !important;
  letter-spacing: -0.2px !important;
}

.bottom-nav a.active {
  color: #006dff !important;
}

.bottom-nav .nav-plus {
  width: 62px !important;
  height: 62px !important;
  min-width: 62px !important;
  min-height: 62px !important;
  margin: -32px auto 0 !important;
  border-radius: 50% !important;
  background: linear-gradient(135deg, #0b72ff, #004bce) !important;
  color: #fff !important;
  box-shadow: 0 16px 35px rgba(0, 109, 255, .38) !important;
  font-size: 0 !important;
}

.bottom-nav .nav-plus svg {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  color: #fff !important;
}

.bottom-nav .nav-plus span {
  display: none !important;
}

/* ======================================================
   OPEN MATCH / CARD FIXES
====================================================== */

.match-card,
.match-item,
.open-match-card {
  overflow: hidden;
}

.match-players,
.player-avatars,
.avatar-stack {
  display: flex;
  align-items: center;
  gap: 0;
}

.match-players img,
.player-avatars img,
.avatar-stack img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  margin-left: -9px;
  background: #dbeafe;
}

.match-players img:first-child,
.player-avatars img:first-child,
.avatar-stack img:first-child {
  margin-left: 0;
}

.match-level,
.level-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: #eafaf0;
  color: #09a957;
  font-size: 12px;
  font-weight: 900;
  padding: 6px 10px;
}

.match-price {
  color: #08a94f;
  font-size: 17px;
  font-weight: 950;
  white-space: nowrap;
}

.btn-join,
.join-button {
  min-width: 74px;
  height: 48px;
  border-radius: 16px;
  background: #006dff;
  color: #fff !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(0, 109, 255, .25);
  white-space: nowrap;
}

/* ======================================================
   MOBILE FIXES
====================================================== */

@media (max-width: 520px) {
  .page,
  .app,
  .app-shell {
    width: 100%;
    max-width: 480px;
    padding-bottom: 110px;
  }

  .hero {
    min-height: 260px;
  }

  .hero-player {
    display: none;
  }

  .quick-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }

  .quick-card,
  .quick-item {
    min-height: 112px;
    padding: 14px 8px;
  }

  .quick-card strong,
  .quick-item strong {
    font-size: 13px;
  }

  .quick-card span,
  .quick-item span {
    font-size: 11px;
  }

  .match-card {
    display: grid;
    grid-template-columns: 78px 1fr auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
  }

  .match-card h3,
  .match-card h4 {
    font-size: 18px;
    line-height: 1.15;
  }

  .match-card p {
    font-size: 13px;
  }

  .match-price {
    font-size: 16px;
  }

  .btn-join,
  .join-button {
    width: 64px;
    min-width: 64px;
    height: 44px;
  }
}

@media (max-width: 380px) {
  .bottom-nav {
    width: calc(100% - 18px) !important;
    grid-template-columns: 1fr 1fr 68px 1fr 1fr !important;
    padding: 0 7px !important;
  }

  .bottom-nav a span {
    font-size: 10px !important;
  }

  .bottom-nav a svg {
    width: 21px !important;
    height: 21px !important;
  }

  .bottom-nav .nav-plus {
    width: 58px !important;
    height: 58px !important;
    min-width: 58px !important;
  }
}


/* ==========================================================
   CNC PADEL V10 RESPONSIVE DESIGN SYSTEM
   Mobile-first / Tablet / Desktop WebView uyumu
========================================================== */
:root{
  --cnc-container-mobile:460px;
  --cnc-container-tablet:920px;
  --cnc-container-desktop:1180px;
  --cnc-gap-xs:8px;
  --cnc-gap-sm:12px;
  --cnc-gap-md:16px;
  --cnc-gap-lg:24px;
  --cnc-radius-sm:14px;
  --cnc-radius-md:18px;
  --cnc-radius-lg:24px;
}

html,body{
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

:is(.cnc-app,.cnc-app-dark,.cnc-booking-app,.cnc-matches-app,.cnc-profile-app,
.cnc-md-app,.md-app,.ctd-app,.cnc-tour-app,.tour-page,.cnc-premium-app){
  width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* ---------- TABLET ---------- */
@media (min-width:600px) and (max-width:1023px){
  body{
    padding-left:18px!important;
    padding-right:18px!important;
  }

  :is(.cnc-app,.cnc-app-dark,.cnc-booking-app,.cnc-matches-app,.cnc-profile-app,
  .cnc-md-app,.md-app,.ctd-app,.cnc-tour-app){
    max-width:var(--cnc-container-tablet)!important;
    padding-left:24px!important;
    padding-right:24px!important;
    border-left:1px solid rgba(91,139,198,.14);
    border-right:1px solid rgba(91,139,198,.14);
    box-shadow:0 20px 60px rgba(2,12,30,.20);
  }

  .tour-page,
  .cnc-premium-app{
    max-width:var(--cnc-container-tablet)!important;
    margin:0 auto!important;
    padding-left:24px!important;
    padding-right:24px!important;
  }

  :is(.cnc-topbar,.cnc-topbar-dark,.cnc-page-top,.cnc-matches-head,.cnc-profile-head,
  .cnc-md-top,.md-topbar,.ctd-topbar,.cnc-tour-topbar,.tour-topbar,.cp-topbar){
    min-height:64px;
  }

  :is(.cnc-quick-grid,.cnc-date-filters,.cnc-summary-grid){
    gap:12px!important;
  }

  .cnc-quick-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  .cnc-quick:nth-child(5){
    grid-column:auto!important;
  }

  :is(.cnc-home-match-list,.cnc-match-list,.cnc-matches-list,.cnc-tour-list,.tour-list){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:14px!important;
  }

  :is(.cnc-date-title,.cnc-tour-section-head,.tour-section-head){
    grid-column:1/-1!important;
  }

  .cnc-profile-hero{
    grid-template-columns:140px minmax(0,1fr)!important;
    padding:24px!important;
  }

  .cnc-profile-avatar{
    width:128px!important;
    height:128px!important;
  }

  :is(.cnc-profile-grid,.cnc-profile-stats,.cnc-achievements-list,.cnc-tournament-history){
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }

  .cnc-booking-app .cnc-step,
  .cnc-md-card,
  .md-card,
  .ctd-card,
  .cnc-score-card{
    padding:18px!important;
  }

  .ctd-stats.v5{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  .cnc-tour-card,
  .tour-card{
    min-height:100%;
  }

  .cp-member-card{
    grid-template-columns:100px minmax(0,1fr) 1fr!important;
  }

  .bottom-nav{
    width:calc(100% - 48px)!important;
    max-width:760px!important;
  }
}

/* ---------- LARGE TABLET / DESKTOP ---------- */
@media (min-width:1024px){
  body{
    padding-left:24px!important;
    padding-right:24px!important;
  }

  :is(.cnc-app,.cnc-app-dark,.cnc-booking-app,.cnc-matches-app,.cnc-profile-app,
  .cnc-md-app,.md-app,.ctd-app,.cnc-tour-app){
    max-width:var(--cnc-container-desktop)!important;
    padding-left:30px!important;
    padding-right:30px!important;
    border-left:1px solid rgba(91,139,198,.14);
    border-right:1px solid rgba(91,139,198,.14);
    box-shadow:0 24px 74px rgba(2,12,30,.22);
  }

  .tour-page,
  .cnc-premium-app{
    max-width:var(--cnc-container-desktop)!important;
    margin:0 auto!important;
    padding-left:30px!important;
    padding-right:30px!important;
  }

  .cnc-quick-grid{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
    gap:14px!important;
  }

  .cnc-quick:nth-child(5){
    grid-column:auto!important;
  }

  :is(.cnc-home-match-list,.cnc-match-list,.cnc-matches-list){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:16px!important;
  }

  :is(.cnc-tour-list,.tour-list){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:18px!important;
  }

  :is(.cnc-date-title,.cnc-tour-section-head,.tour-section-head){
    grid-column:1/-1!important;
  }

  .cnc-profile-hero{
    grid-template-columns:160px minmax(0,1fr)!important;
    padding:28px!important;
  }

  .cnc-profile-avatar{
    width:146px!important;
    height:146px!important;
  }

  :is(.cnc-profile-grid,.cnc-profile-stats,.cnc-achievements-list,.cnc-tournament-history){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  .cnc-md-main{
    grid-template-columns:170px minmax(0,1fr) 170px!important;
  }

  .ctd-stats.v5{
    grid-template-columns:repeat(5,minmax(0,1fr))!important;
  }

  .ctd-card,
  .ctd-summary-card,
  .cnc-md-card,
  .md-card,
  .cnc-booking-app .cnc-step{
    padding:20px!important;
  }

  .cp-member-card{
    grid-template-columns:120px minmax(0,1fr) 1fr!important;
  }

  .bottom-nav{
    width:calc(100% - 64px)!important;
    max-width:820px!important;
  }
}

/* ---------- VERY WIDE DESKTOP ---------- */
@media (min-width:1366px){
  :is(.cnc-app,.cnc-app-dark,.cnc-booking-app,.cnc-matches-app,.cnc-profile-app,
  .cnc-md-app,.md-app,.ctd-app,.cnc-tour-app,.tour-page,.cnc-premium-app){
    max-width:1240px!important;
  }

  :is(.cnc-home-match-list,.cnc-match-list,.cnc-matches-list,.cnc-tour-list,.tour-list){
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }

  :is(.cnc-date-title,.cnc-tour-section-head,.tour-section-head){
    grid-column:1/-1!important;
  }
}


@media (min-width:600px){
  .bottom-nav{
    width:calc(100% - 48px)!important;
    max-width:760px!important;
  }
}
