/* ============================
   Base & Resets (non-visual)
   ============================ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improve keyboard visibility without changing desktop look */
:focus-visible {
  outline: 2px solid #002373;
  outline-offset: 2px;
}

/* Respect reduced motion users */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================
   Auth cards (login/register)
   ============================ */
.kk-auth-card {
  max-width: 550px;
  margin: 20px auto;
  border: 1px solid #eee;
  border-radius: 8px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.kk-auth-card h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.kk-field {
  margin: 10px 0 12px;
}

.kk-label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  display: block;
}

.kk-input,
.kk-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.kk-btn {
  width: 100%;
  padding: 12px 14px;
  background: #e50b44;
  border: 1px solid #e50b44;
  color: #fff;
  border-radius: 6px;
  text-align: center;
  font-weight: 700;
  cursor: pointer;
}

.kk-btn:hover {
  filter: brightness(0.98);
  color:#fff;
}

.kk-auth-links {
  text-align: center;
  margin: 12px 0 6px;
  font-size: 13px;
}

.kk-auth-links a {
  color: #e50b44;
  text-decoration: none;
}

/* ============================
   Alerts
   ============================ */
.kk-error {
  background: #fff2f2;
  border: 1px solid #ffd3d3;
  color: #a40000;
  padding: 10px;
  border-radius: 6px;
}

.kk-ok {
  background: #f1fff5;
  border: 1px solid #c8efcf;
  color: #0a6d2a;
  padding: 10px;
  border-radius: 6px;
}

/* ============================
   Dashboard layout
   ============================ */
.kk-wrap {
  margin: 0 auto;
}

/* Searchbar (keeps desktop look) */
.kk-searchbar {
  background: #002373;
  padding: 30px;
  border-radius: 0px;
  /* display: flex; */
  flex-wrap: wrap;
  gap: 16px;
  color: #fff;
  /* column flow on narrow screens is handled in media queries below */
}

.kk-searchbar input[type="text"] {
  flex: 1;
  padding: 15px;
  border-radius: 0px;
  border: 0;
}

.kk-searchbar button {
  padding: 10px 30px;
  border-radius: 0px;
  color: #fff;
  border: 0;
}

/* Two-column shell (desktop preserved) */
.kk-split2 {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 26px;
  margin-top: 26px;
}

/* .kk-side {
  border: 1px solid #eee;
  border-radius: 10px;
  padding: 16px;
} */

.kk-side a {
  display: block;
  padding: 12px 14px;
  border: 1px solid #000000;
  border-radius: 0px;
  text-align: left;
  font-weight: 600;
  margin-bottom: 10px;
  color: #222;
  text-decoration: none;
}

.kk-side a.is-active {
  background-color: #000000;
  color: #ffffff;
  box-shadow: 0 0 0 2px rgba(229, 11, 68, 0.08) inset;
}

/* ============================
   Profile card
   ============================ */
.kk-profile {
  border: 0;
  border-radius: 0;
  padding: 0;
  background: #fff;
}
.kk-contact-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px;
}
.kk-contact-details div {
  background-color: #f7f7f7;
  padding: 10px 10px;
  border: 1px solid #cdcdcdcd;
  font-size: 14px;
}
.kk-contact-details div a {
  color: #000000;
}
.kk-more-details h4 {
  font-size: 16px;
}
.kk-profile .kk-top {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 20px;
}
.owner-name {
  text-transform: uppercase;
  font-family: "CamptonSemiBold";
}
.kk-profile img {
  width: 100%;
  height: 150px;
  object-fit: scale-down;
  /* border: 3px solid #e60000; */
  padding: 20px;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 0px 16px;
}
.kk-profile .kk-top h3 {
  font-size: 22px;
  text-transform: uppercase;
  letter-spacing: 1px;
}
.kk-chip {
  display: inline-block;
  border: 1px solid #e3e3e3;
  border-radius: 14px;
  padding: 4px 10px;
  font-size: 12px;
  margin: 3px 6px 0 0;
}

/* ============================
   Forms (global)
   ============================ */
.kk-form label {
  font-weight: 600;
  margin-top: 14px;
  display: block;
}

.kk-form input[type="text"],
.kk-form input[type="url"],
.kk-form input[type="tel"],
.kk-form textarea,
.kk-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
}

.kk-form textarea {
  min-height: 90px;
}

.kk-form button {
  margin-top: 14px;
  padding: 8px 12px;
  background: #e50b44;
  color: #fff;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.kk-form input[type="url"] {
  margin-bottom: 8px;
}

/* ============================
   Profile – Bottom sections
   (desktop layout preserved)
   ============================ */
.kk-profile .kk-bottom {
  margin-top: 24px;
}

.kk-profile .kk-bottom .kk-section {
  border: 1px solid #f1f1f1;
  border-radius: 0px;
  background-color: #f9f9f9;
  box-shadow: rgba(17, 17, 26, 0.1) 0px 0px 16px;
}

.kk-profile .kk-bottom .kk-section h4 {
  margin-bottom: 0px;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  background-color: #e60000;
  padding: 10px;
}
.kk-profile .kk-bottom .kk-section .kk-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px;
}

.kk-profile .kk-bottom .kk-section .kk-items .kk-item {
  background: #e3e3e3;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: 12px;
  color: #333;
  max-width: 140px;
}

.kk-profile .kk-bottom .kk-section .kk-items .kk-item a {
  color: #333;
  text-decoration: none;
}

.kk-profile .kk-bottom .kk-section .kk-items .kk-item a:hover {
  color: #e50b44;
}

/* Catalog row inside sections */
.kk-profile .kk-bottom .kk-section .kk-catalog {
  background-color: #f6fff8;
  border: 0px;
 /* padding: 12px 16px; 
  border-radius: 0px;
  display: flex;
  justify-content: space-between;
  align-items: center; */
}

.kk-profile .kk-bottom .kk-section .kk-catalog a {
  text-decoration: none;
}

.kk-profile .kk-bottom .kk-section .kk-catalog a:hover {
  text-decoration: none;
}

a.bg_black {
    border: none;
    margin: 12px;
}

/* ============================
   Results
   ============================ */
.kk-results {
  margin-top: 20px;
}

.kk-results a {
  border: 2px solid #6c757d;
  padding: 8px;
  border-radius: 5px;
  margin-right: 10px;

  color: #000;
  text-decoration: none;
}

/* ============================
   Searchbar structured rows
   ============================ */
.kk-row {
  display: flex;
  gap: 16px;
  align-items: center;
}

.kk-input-label {
  display: flex;
  flex-direction: column;

  margin-bottom: 15px;
  flex: 1;
}

.kk-input,
.kk-select {
  padding: 15px;

  border: 1px solid #ccc;
  border-radius: 0px;
  margin-top: 5px;
}

.kk-genres {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  flex: 1;
}

.kk-checkbox-label {
  display: flex;
  align-items: center;
}
.kk-checkbox {
  margin-right: 8px;
}

.kk-submit-button {
  padding: 10px 20px;
  background-color: #e60000;
  color: #fff;
  font-size: 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================
   Two-column sections (general)
   ============================ */
.kk-bottom {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.kk-section {
  background-color: #f6f6f6;
  border: 1px solid #ddd;

  border-radius: 8px;
}

.kk-section h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #222;
}

.kk-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.kk-item {
  background-color: #e3e3e3;
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 12px;
  color: #333;
  max-width: 140px;
}

.kk-item a {
  color: #333;
  text-decoration: none;
}

.kk-item a:hover {
  color: #e50b44;
}

/* Catalog section spanning 2 cols on desktop (unchanged) */
.kk-catalog {
  grid-column: span 2;
/*  background-color: #f0fff0;
  border: 1px solid #c8efcf;
  padding: 16px; */
  border-radius: 10px;
  display: grid;
 /* justify-content: space-between; */
 /*  align-items: center;  */
}

/* .kk-catalog a {
  color: #e50b44;
  font-weight: 600;
  text-decoration: none;
}

.kk-catalog a:hover {
  text-decoration: underline;
} */

/* ============================
   "More Details" toggle
   (fix collision without changing desktop)
   ============================ */
.kk-more-details {
  width: fit-content;
  cursor: pointer;
  font-size: 16px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 8px 0;
  padding: 10px 30px;
  background-color: #002373;
  border-radius: 0;
  border: 0;
  transition: background-color 0.3s ease;
  border-right: 5px solid #e60000;
  margin-top: 20px;
}

.kk-more-details:hover {
  background-color: #000000;
}

.kk-toggle-icon {
  font-size: 18px;
  color: #ffffff;
  transition: transform 0.3s ease;
  margin-left: 5px;
}

.kk-more-details.active .kk-toggle-icon {
  transform: rotate(45deg);
}

/* IMPORTANT:
   Only hide kk-bottom when it is the immediate sibling of kk-more-details.
   This prevents global hiding that broke desktop layouts. */
.kk-more-details + .kk-bottom {
  display: none;
}
.kk-more-details.active + .kk-bottom {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}

.kk-more-details h5,
.kk-more-details h4 {
  margin-bottom: 0;
}

input#kk_catalog,
input#kk_avatar {
  padding-top: 10px;
}

input#kk_catalog {
  display: block;
}

/* ============================
   RESPONSIVE ONLY
   (Desktop & laptop design preserved)
   ============================ */

/* Large tablets (<= 1024px) */
@media (max-width: 1024px) {
  .kk-split2 {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }
  .kk-profile .kk-top {
    grid-template-columns: 200px 1fr;
  }
}

/* Tablets (<= 768px) */
@media (max-width: 768px) {
  .kk-searchbar {
    flex-direction: column;
  }
  .kk-row {
    flex-direction: column;
    align-items: stretch;
  }

  .kk-split2 {
    grid-template-columns: 1fr; /* stack sidebar and content */
    gap: 18px;
    display: block;
  }
  .kk-contact-details {
    flex-wrap: wrap;
    row-gap: 10px;
  }
  .kk-profile .kk-top {
    grid-template-columns: 1fr; /* stack avatar/info */
  }
  .kk-profile .kk-bottom .kk-section {
    margin-bottom: 0px;
  }
  .kk-contact-details div {
    width: 100%;
  }

  .kk-bottom {
    grid-template-columns: 1fr; /* stack sections */
    gap: 12px;
  }

  .kk-catalog {
    grid-column: auto;
  } /* no forced spanning on narrow */

  .kk-more-details {
    width: 100%;
    font-size: 15px;
    justify-content: space-between;
    padding: 10px 15px;
  }
  .kk-more-details h4 {
    display: flex;
    justify-content: space-between;
    width: 100%;
  }
  .kk-auth-card {
    margin: 16px auto;
    padding: 16px;
  }
}

/* Phones (<= 576px) */
@media (max-width: 576px) {
  .kk-auth-card h2 {
    font-size: 18px;
  }
  .kk-label {
    font-size: 12px;
  }
  .kk-input,
  .kk-select {
    font-size: 15px;
    padding: 9px 10px;
  }

  .kk-btn,
  .kk-submit-button {
    padding: 12px;
    font-size: 15px;
  }

  .kk-results a {
    display: inline-block;
    margin: 6px 8px 0 0;
    font-size: 15px;
  }

  .kk-profile img {
    height: 80px;
  }
  .kk-chip {
    font-size: 11px;
  }

  /* .kk-section {
    padding: 14px;
  } */
  .kk-item {
    max-width: 100%;
  }
}

/* Small phones (<= 400px) */
@media (max-width: 400px) {
  .kk-auth-card {
    padding: 14px;
  }
  .kk-searchbar {
    padding: 16px;
  }
  /* .kk-side {
    padding: 14px;
  } */
  /* .kk-profile {
    padding: 14px;
  } */
  .kk-catalog {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
}

/* ===== Member Directory (moved from inline <style>) ===== */
.kk-dir {
  max-width: 980px;
}

.kk-dir .kk-card {
  display: flex;
  gap: 24px;
  padding: 24px 0;
  border-bottom: 1px solid #eee;
}

.kk-dir .kk-logo {
  flex: 0 0 140px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kk-dir .kk-logo img {
  max-width: 120px;
  max-height: 120px;
  border-radius: 4px;
  object-fit: contain;
}

.kk-dir .kk-body {
  flex: 1;
}

.kk-dir .kk-h1 {
  font-size: 28px;
  line-height: 1.2;
  margin: 0 0 6px;
}
.kk-dir .kk-h1 a {
  color: #002373;
}
.kk-dir .kk-sub {
  color: #555;
  margin-bottom: 10px;
}

.kk-dir .kk-blurb {
  color: #333;
  margin: 10px 0 14px;
}

.kk-dir .kk-ct-toggle {
  cursor: pointer;
  user-select: none;
  color: #b3003c;
  font-weight: 600;
  margin: 14px 0;
}

.kk-dir .kk-ct {
  display: none;
  padding: 10px 14px;
  background: #fff7f9;
  border: 1px solid #fde;
}

.kk-dir .kk-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.kk-dir .kk-badge {
  display: inline-block;
  padding: 6px 10px;
  border: 1px solid #e4e4e4;
  border-radius: 999px;
  font-size: 12px;
}

.kk-dir .kk-pager {
  display: flex;
  gap: 6px;
  margin-top: 22px;
}

.kk-dir .kk-pager a,
.kk-dir .kk-pager span {
  padding: 6px 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  text-decoration: none;
}

.kk-dir .kk-pager .is-current {
  background: #b3003c;
  color: #fff;
  border-color: #b3003c;
}

/* Responsive only (desktop unchanged) */
@media (max-width: 768px) {
  .kk-dir .kk-card {
    flex-direction: column;
    gap: 16px;
  }
  .kk-input-label {
    margin-bottom: 0px;
  }
  .kk-genres {
    gap: 10px;
    margin-top: 10px;
  }
  .kk-searchbar input[type="text"] {
    padding: 10px;
  }
  .kk-dir .kk-logo {
    flex: 0 0 auto;
    justify-content: flex-start;
  }
  .kk-dir .kk-logo img {
    max-width: 100px;
    max-height: 100px;
  }
  .kk-dir .kk-h1 {
    font-size: 24px;
  }
}
@media (max-width: 480px) {
  .kk-dir .kk-h1 {
    font-size: 22px;
  }
  .kk-dir .kk-badge {
    font-size: 11px;
  }
}
/* End of Member Directory tab css */

/* password eye */
.kk-input-wrap {
  position: relative;
}

.kk-input-wrap .kk-eye-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 0;
  padding: 0;
  cursor: pointer;
  line-height: 1;
}

.kk-password-field .kk-input {
  padding-right: 2.5rem;
}

.kk-contact-details.mb-3 {
    max-width: fit-content;
}

.kk-contact-details a,
.kk-contact-details > div {
  word-break: break-word;
  overflow-wrap: anywhere;
}


/* red highlight when we flag invalid */
.kk-invalid {
  border-color: #b00020 !important;
  outline-color: #b00020 !important;
}

.kk-field-error {
  display: block;
  margin: 6px 0 10px;
  color: #b00020;
  font-size: 13px;
  line-height: 1.3;
}

/* For modal on edit profile page  */
/* Modal visuals */
.kk-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.kk-modal.is-open {
  display: block;
}

.kk-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .45);
}

.kk-modal__box {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 520px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
  padding: 20px 22px;
  width: 80%;
}

.kk-modal__title {
  margin: 0 0 8px;
  font-size: 18px;
}

.kk-modal__body {
  margin: 8px 0 16px;
}

.kk-modal__actions {
  text-align: right;
}

.kk-modal .kk-alert {
  margin: 0;
}

.kk-alert-ok {
  color: #135e0a;
  background: #f1fff1;
  border: 1px solid #cce8cc;
  padding: 10px;
  border-radius: 6px;
}

.kk-alert-error {
  color: #b00020;
  background: #fff4f5;
  border: 1px solid #f3c2c8;
  padding: 10px;
  border-radius: 6px;
}