/**
 * YK Enerji Forms - Floating widget & modal form styles
 * Reusable: yk-form-table, yk-form-section, yk-blue-bar
 */

/* ========== DESKTOP SIDE WIDGET (sağda sabit, pill sola açılır - referans left-bottom-fix stili) ========== */
.yk-side-widget {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 0;
  z-index: 9999;
  transition: 0.3s ease;
}

.yk-side-btn {
  position: relative;
  width: 56px;
  height: 56px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-left: none;
  background: var(--theme-color-3, #0b1f55);
  color: #fff;
  display: grid;
  place-items: center;
  cursor: pointer;
  padding: 0;
  transition: border-radius 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.yk-side-btn:first-of-type {
  border-top-left-radius: 15px;
  border-top-right-radius: 0;
}

.yk-side-btn:last-of-type {
  border-bottom-left-radius: 15px;
  border-bottom-right-radius: 0;
}

.yk-side-btn:hover,
.yk-side-btn:focus-visible {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
  outline: none;
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Pill: sağdan sola açılır (referans leftToRight'ın ayna hali - 0.2s) */
.yk-side-pill {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%) translateX(12px);
  margin-right: -1px;
  background: var(--theme-color-3, #0b1f55);
  color: #fff;
  height: 44px;
  display: flex;
  align-items: center;
  padding: 0 18px 0 16px;
  border-radius: 999px 0 0 999px;
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-right: none;
  white-space: nowrap;
  font-weight: 600;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: -1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.yk-side-btn:hover .yk-side-pill,
.yk-side-btn:focus-visible .yk-side-pill,
.yk-side-btn.is-active .yk-side-pill {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  pointer-events: auto;
}

.yk-side-pill::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  background: inherit;
  border-radius: 2px;
  rotate: 45deg;
  z-index: 0;
}

.yk-side-ico {
  position: relative;
  z-index: 1;
}

.yk-side-ico i {
  font-size: 22px;
  line-height: 1;
}

/* Desktop: sadece .yk-side-widget görünsün */
@media (max-width: 768px) {
  .yk-side-widget {
    display: none;
  }
}

/* ========== MOBILE FAB (mobilde açılır menü) ========== */
.yk-mobile-fab {
  display: none;
  position: fixed;
  right: 12px;
  bottom: 20px;
  top: auto;
  transform: none;
  z-index: 9999;
  flex-direction: column;
  gap: 8px;
  font-family: var(--outfit-font, "Outfit", sans-serif);
}

.yk-mobile-fab .yk-widget-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: var(--theme-color-3, #0b1f55);
  color: var(--white-color, #fff) !important;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(11, 31, 85, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
}

.yk-mobile-fab .yk-widget-btn .yk-widget-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.yk-mobile-fab .yk-widget-btn .yk-widget-label {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.yk-mobile-fab .yk-widget-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--theme-color-3, #0b1f55);
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(11, 31, 85, 0.4);
}

@media (max-width: 768px) {
  .yk-mobile-fab {
    display: flex;
  }

  .yk-mobile-fab:not(.yk-widget-expanded) .yk-widget-btn {
    display: none;
  }

  .yk-mobile-fab.yk-widget-expanded .yk-widget-btn {
    display: flex;
  }
}

/* ========== MODAL OVERRIDES ========== */
.yk-modal .modal-dialog {
  max-width: 900px;
}

.yk-modal .modal-xl .modal-dialog {
  max-width: 95%;
  width: 900px;
}

.yk-modal .modal-header {
  border-bottom: none;
  padding: 0.5rem 1rem;
  justify-content: flex-end;
}

.yk-modal .modal-content {
  border-radius: 8px;
  border: 1px solid var(--hr-color, #e5e7eb);
}

.yk-modal .modal-body {
  padding: 0;
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 70vh;
  
}
@media(max-width:1024px){
    .yk-modal .modal-body {
        max-height: 50vh;
    }
}
/* Modal form footer (Gönder butonu) */
.yk-modal .modal-footer.yk-form-footer {
  border-top: 1px solid var(--hr-color, #e5e7eb);
  padding: 1rem 1.25rem;
  justify-content: flex-end;
}

.yk-modal .yk-form-footer .btn-theme {
  min-width: 120px;
}

/* Form page container (A4-like, scroll modal-body'de) */
.yk-form-page {
  background: var(--white-color, #fff);
  border: 1px solid #ddd;
  margin: 0 auto;
  max-width: 210mm;
  min-height: 200px;
  padding: 16px 20px;
  font-size: 12px;
  line-height: 1.4;
  font-family: var(--dm-sans-font, "DM Sans", sans-serif);
  color: #333;
}

.yk-form-page input,
.yk-form-page textarea,
.yk-form-page select {
  font-size: 12px;
  font-family: inherit;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  width: 100%;
}

.yk-form-page input:focus,
.yk-form-page textarea:focus {
  border-bottom-color: var(--theme-color-3, #0b1f55);
  outline: none;
}

/* ========== BLUE BAR (section headers) ========== */
.yk-blue-bar {
  background: #0b3d7a;
  color: #fff;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  margin: 12px 0 0;
}

.yk-blue-bar:first-child {
  margin-top: 0;
}

/* ========== FORM TABLE (docx-like grid) ========== */
.yk-form-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid #333;
  margin-bottom: 0;
  font-size: 12px;
}

.yk-form-table th,
.yk-form-table td {
  border: 1px solid #444;
  padding: 6px 8px;
  vertical-align: top;
  background: transparent;
}

.yk-form-table th {
  background: #f0f0f0;
  font-weight: 600;
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.02em;
  width: 38%;
}

.yk-form-table td {
  width: 62%;
}

.yk-form-table input[type="text"],
.yk-form-table input[type="email"],
.yk-form-table input[type="tel"],
.yk-form-table input[type="number"],
.yk-form-table textarea {
  border: none;
  border-bottom: 1px solid #999;
  border-radius: 0;
  padding: 2px 4px;
  min-height: 22px;
}

.yk-form-table textarea {
  min-height: 48px;
  resize: vertical;
}

/* Two-column layout for signature blocks */
.yk-form-table.yk-two-col th {
  width: 50%;
}

.yk-form-table.yk-two-col td {
  width: 50%;
}

/* ========== FORM SECTION (group of rows) ========== */
.yk-form-section {
  margin-bottom: 8px;
}

.yk-form-section .yk-form-table {
  margin-top: 4px;
}

/* ========== CHECKBOX / RADIO (aligned) ========== */
.yk-check-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  align-items: center;
}

.yk-check-group label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  text-transform: none;
}

.yk-check-group input[type="checkbox"],
.yk-check-group input[type="radio"] {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--theme-color-3, #0b1f55);
}

.yk-check-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px 16px;
}

.yk-check-grid label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 11px;
}

.yk-check-grid input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  flex-shrink: 0;
}

/* ========== FORM HEADER (logo + title block) ========== */
.yk-form-header {
  text-align: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #ddd;
}

.yk-form-logo {
  max-height: 48px;
  margin-bottom: 6px;
}

.yk-form-title-main {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #111;
  margin: 4px 0 2px;
}

.yk-form-title-sub {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #333;
}

/* ========== RADIO ROW (YES/NO) ========== */
.yk-radio-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.yk-radio-row .yk-label-inline {
  font-weight: 600;
  margin-right: 8px;
}

/* ========== TEXTAREA FULL WIDTH ========== */
.yk-textarea-block {
  margin-top: 6px;
}

.yk-textarea-block textarea {
  width: 100%;
  min-height: 70px;
  padding: 8px;
  border: 1px solid #444;
  resize: vertical;
}

.yk-form-page .yk-note-small {
  font-size: 10px;
  color: #666;
  margin-top: 2px;
}
