/* =========================================================================
   Rukn Adeem — UI v2: service request forms
   Contract renewal, skilled labor, known service.
   Builds on rukn.css (fields, buttons, page hero, info cards).
   Loaded via @push('styles').
   ========================================================================= */

/* ---------------------------------------------------------------------------
   Page layout: sticky side panel + form card, pulled over the hero edge
   --------------------------------------------------------------------------- */

.rk-formpage {
  position: relative;
  margin-top: clamp(-48px, -4vw, -32px);
}

.rk-formpage__grid {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.rk-formpage__aside {
  position: sticky;
  top: calc(var(--rk-header-gap) + var(--rk-header-h) + 20px);
  display: grid;
  gap: 14px;
}

/* ---------------------------------------------------------------------------
   Form card + blocks
   --------------------------------------------------------------------------- */

.rk-formcard {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r-xl);
  background: #fff;
  box-shadow: var(--rk-shadow);
}

.rk-formcard__head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rk-line);
}

.rk-formcard__icon {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--rk-lime);
  color: var(--rk-ink);
  font-size: 1.15rem;
}

.rk-formcard__head h2 {
  font-size: 1.3rem;
}

.rk-formcard__head p {
  margin-top: 6px;
  color: var(--rk-muted);
  line-height: 1.8;
}

.rk-fblock {
  min-width: 0;
  margin: 0;
  padding: 24px 0;
  border: 0;
  border-bottom: 1px dashed var(--rk-line-strong);
  scroll-margin-top: calc(var(--rk-header-gap) + var(--rk-header-h) + 24px);
}

.rk-fblock:last-of-type {
  border-bottom: 0;
}

/* A full-width float keeps the legend inside the fieldset's padding box
   (by default browsers draw it on the top border, above the padding). */
.rk-fblock__title {
  display: flex;
  float: left;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 18px;
  padding: 0;
  color: var(--rk-ink);
  font-size: 1.08rem;
  font-weight: 700;
  line-height: 1.4;
}

.rk-fblock__title + * {
  clear: both;
}

.rk-fblock__num {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--rk-ink);
  color: var(--rk-lime);
  font-size: 0.82rem;
  font-weight: 700;
}

.rk-fgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.rk-fgrid--2 {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.rk-req {
  margin-inline-start: 2px;
  color: #c0392b;
}

.rk-formcard__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 22px;
  border-top: 1px solid var(--rk-line);
}

.rk-formcard__foot .text-danger {
  flex-basis: 100%;
}

.rk-formcard__foot .rk-btn {
  min-width: 200px;
}

.rk-formcard__foot .rk-btn:disabled {
  opacity: 0.7;
  cursor: wait;
  transform: none;
}

/* ---------------------------------------------------------------------------
   File drop zones (.file-dropzone is the script hook)
   --------------------------------------------------------------------------- */

.rk-drop-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.rk-drop {
  position: relative;
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  border: 1.5px dashed var(--rk-line-strong);
  border-radius: 16px;
  background: var(--rk-paper);
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s;
}

.rk-drop:hover,
.rk-drop.is-drag {
  border-color: var(--rk-olive);
  background: var(--rk-lime-50);
}

.rk-drop:focus-visible {
  outline: 3px solid var(--rk-lime);
  outline-offset: 2px;
}

.rk-drop__icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #fff;
  color: var(--rk-olive);
  font-size: 1.05rem;
  box-shadow: var(--rk-shadow-sm);
  transition: background-color 0.2s, color 0.2s;
}

.rk-drop__text {
  color: var(--rk-ink-700);
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.5;
}

.rk-drop__file {
  max-width: 100%;
  overflow: hidden;
  color: var(--rk-muted);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rk-drop.has-file {
  border-style: solid;
  border-color: var(--rk-lime);
  background: var(--rk-lime-50);
}

.rk-drop.has-file .rk-drop__icon {
  background: var(--rk-lime);
  color: var(--rk-ink);
}

.rk-drop.has-file .rk-drop__file {
  color: var(--rk-ink);
  font-weight: 600;
}

.rk-drop.has-file::after {
  content: "\f00c";
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--rk-ink);
  color: var(--rk-lime);
  font-family: "Font Awesome 6 Pro";
  font-size: 0.7rem;
  font-weight: 900;
}

/* ---------------------------------------------------------------------------
   Side panel cards
   --------------------------------------------------------------------------- */

.rk-sidecard {
  padding: 22px;
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r-lg);
  background: #fff;
}

.rk-sidecard__title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1.02rem;
}

.rk-sidecard__title i {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--rk-lime-100);
  color: var(--rk-olive-800);
  font-size: 0.85rem;
}

.rk-notes {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-notes li {
  display: flex;
  gap: 10px;
  color: var(--rk-muted);
  font-size: 0.92rem;
  line-height: 1.7;
}

.rk-notes li i {
  margin-top: 5px;
  color: var(--rk-olive);
  font-size: 0.8rem;
}

.rk-secnav {
  display: grid;
  gap: 4px;
}

.rk-secnav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 12px;
  color: var(--rk-ink-700);
  font-size: 0.93rem;
  font-weight: 600;
  transition: background-color 0.2s, color 0.2s;
}

.rk-secnav a:hover {
  background: var(--rk-paper);
  color: var(--rk-ink);
}

.rk-secnav a span {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: var(--rk-gray-100);
  color: var(--rk-muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.rk-helpcard {
  position: relative;
  isolation: isolate;
  padding: 22px;
  overflow: hidden;
  border-radius: var(--rk-r-lg);
  background: var(--rk-ink);
  color: #fff;
}

.rk-helpcard::after {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: -40px;
  inset-inline-end: -40px;
  width: 130px;
  height: 130px;
  border: 0 solid rgba(198, 209, 11, 0.14);
  border-bottom-width: 18px;
  border-inline-end-width: 18px;
}

.rk-helpcard h3 {
  color: #fff;
  font-size: 1.05rem;
}

.rk-helpcard p {
  margin-top: 4px;
  color: var(--rk-on-dark-muted);
  font-size: 0.9rem;
}

.rk-helpcard__actions {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

/* vertical steps (skilled labor) */
.rk-timeline {
  display: grid;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rk-timeline li {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  padding-bottom: 20px;
}

.rk-timeline li:last-child {
  padding-bottom: 0;
}

.rk-timeline li::before {
  content: "";
  position: absolute;
  top: 42px;
  bottom: 6px;
  inset-inline-start: 17px;
  width: 2px;
  background: var(--rk-line-strong);
}

.rk-timeline li:last-child::before {
  display: none;
}

.rk-timeline__num {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--rk-lime);
  color: var(--rk-ink);
  font-size: 0.85rem;
  font-weight: 700;
}

.rk-timeline h4 {
  margin: 6px 0 4px;
  color: var(--rk-ink);
  font-size: 0.98rem;
}

.rk-timeline p {
  color: var(--rk-muted);
  font-size: 0.88rem;
  line-height: 1.7;
}

/* four info cards */
.rk-cards-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}

/* ---------------------------------------------------------------------------
   Reviews slider (Swiper is started by app.js on .reviews-swiper)
   --------------------------------------------------------------------------- */

.rk-reviews .swiper {
  padding: 4px 2px 8px;
}

.rk-reviews .swiper-slide {
  height: auto;
}

.rk-review {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 24px;
  border: 1px solid var(--rk-line);
  border-radius: var(--rk-r-lg);
  background: #fff;
}

.rk-review__quote {
  position: absolute;
  top: 10px;
  inset-inline-end: 18px;
  color: var(--rk-lime-200);
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

.rk-review__stars {
  display: flex;
  gap: 3px;
  color: var(--rk-lime-600);
  font-size: 0.9rem;
}

.rk-review__text {
  flex: 1;
  color: var(--rk-ink-700);
  line-height: 1.9;
}

.rk-review__who {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px dashed var(--rk-line-strong);
}

.rk-review__avatar {
  display: grid;
  flex-shrink: 0;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--rk-ink);
  color: var(--rk-lime);
  font-weight: 700;
}

.rk-review__who strong {
  display: block;
  color: var(--rk-ink);
  font-size: 0.95rem;
}

.rk-review__who small {
  display: block;
  color: var(--rk-muted);
  font-size: 0.82rem;
}

.rk-reviews .reviews-swiper-pagination {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 22px;
}

.rk-reviews .swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  margin: 0 !important;
  border-radius: 99px;
  background: var(--rk-gray-300);
  opacity: 1;
  transition: width 0.3s var(--rk-ease), background-color 0.3s;
}

.rk-reviews .swiper-pagination-bullet-active {
  width: 26px;
  background: var(--rk-ink);
}

/* ---------------------------------------------------------------------------
   Responsive
   --------------------------------------------------------------------------- */

@media (max-width: 991.98px) {
  .rk-formpage__grid {
    grid-template-columns: 1fr;
  }

  .rk-formpage__aside {
    position: static;
    order: 2;
  }

  .rk-formpage__aside .rk-secnav-card {
    display: none;
  }
}

@media (max-width: 575.98px) {
  .rk-formcard__foot .rk-btn {
    width: 100%;
  }
}
