/* BERICAP Digital Suggestion System - Public Styles */
:root {
  --bericap-blue: #003366;
  --bericap-blue-light: #004488;
  --bericap-blue-dark: #002244;
  --bericap-orange: #FF6600;
  --bericap-orange-hover: #e55a00;
  --text-primary: #1a1a2e;
  --text-secondary: #5a6270;
  --text-muted: #8b95a5;
  --bg-page: #f0f2f5;
  --bg-card: #ffffff;
  --border-color: #dde1e8;
  --border-radius: 10px;
  --shadow-sm: 0 1px 3px rgba(0, 51, 102, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 51, 102, 0.12);
  --success: #198754;
  --warning: #ffc107;
  --danger: #dc3545;
  --info: #0d6efd;
  --font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --header-height: 64px;
  --transition: 0.2s ease;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  color: var(--text-primary);
  background: var(--bg-page);
  line-height: 1.6;
  min-height: 100vh;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--bericap-blue);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--bericap-orange);
}

/* Header */
.site-header {
  background: linear-gradient(135deg, var(--bericap-blue-dark) 0%, var(--bericap-blue) 100%);
  color: #fff;
  padding: 0 1rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #fff;
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
}

.site-logo:hover {
  color: #fff;
}

.site-logo__mark {
  width: 40px;
  height: 40px;
  background: var(--bericap-orange);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.75rem;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  color: rgba(255, 255, 255, 0.9);
  padding: 0.5rem 0.875rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}

.site-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* Main layout */
.main-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.25rem 1rem 3rem;
}

.hero {
  text-align: center;
  padding: 2rem 1rem 1.5rem;
}

.hero__slogan {
  font-size: clamp(1.5rem, 4vw, 2.25rem);
  font-weight: 700;
  color: var(--bericap-blue);
  margin: 0 0 0.5rem;
  line-height: 1.3;
}

.hero__subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
  max-width: 560px;
  margin-inline: auto;
}

/* Cards */
.card {
  background: var(--bg-card);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.card__header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-color);
  background: linear-gradient(to right, rgba(0, 51, 102, 0.04), transparent);
}

.card__header h2 {
  margin: 0;
  font-size: 1.125rem;
  color: var(--bericap-blue);
  font-weight: 600;
}

.card__body {
  padding: 1.25rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}

.form-group label .required {
  color: var(--bericap-orange);
}

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text-primary);
  background: #fff;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--bericap-blue);
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.15);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.form-error {
  font-size: 0.8rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .checkbox-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.checkbox-item:hover {
  border-color: var(--bericap-blue);
  background: rgba(0, 51, 102, 0.03);
}

.checkbox-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--bericap-blue);
  cursor: pointer;
}

.checkbox-item span {
  font-size: 0.9rem;
}

/* Photo upload */
.photo-upload {
  border: 2px dashed var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}

.photo-upload:hover,
.photo-upload.dragover {
  border-color: var(--bericap-orange);
  background: rgba(255, 102, 0, 0.04);
}

.photo-upload input {
  display: none;
}

.photo-upload__icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.photo-preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.photo-preview {
  position: relative;
  aspect-ratio: 1;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
}

.photo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo-preview__remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 24px;
  height: 24px;
  border: none;
  border-radius: 50%;
  background: rgba(220, 53, 69, 0.9);
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--bericap-orange);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--bericap-orange-hover);
  color: #fff;
}

.btn-secondary {
  background: var(--bericap-blue);
  color: #fff;
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bericap-blue-light);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--bericap-blue);
  border: 2px solid var(--bericap-blue);
}

.btn-outline:hover:not(:disabled) {
  background: var(--bericap-blue);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.875rem 1.5rem;
  font-size: 1rem;
}

/* Success panel */
.success-panel {
  text-align: center;
  padding: 2rem 1rem;
}

.success-panel__icon {
  width: 72px;
  height: 72px;
  background: rgba(25, 135, 84, 0.12);
  color: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 1rem;
}

.success-panel__number {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--bericap-blue);
  margin: 0.5rem 0;
}

.success-panel__qr {
  max-width: 200px;
  margin: 1.5rem auto;
  padding: 1rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.success-panel__qr img {
  margin: 0 auto;
}

.success-panel__tip {
  max-width: 520px;
  margin: 0.75rem auto 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.track-link-box {
  max-width: 560px;
  margin: 1.25rem auto 0;
  text-align: left;
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.track-link-box label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.9rem;
}

.track-link-box__row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.track-link-box__row .form-control {
  flex: 1;
  min-width: 0;
  font-size: 0.85rem;
  background: #fff;
}

.track-link-box__actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.track-link-box__hint {
  margin: 0.75rem 0 0;
  font-size: 0.82rem;
}

.track-link-box--compact {
  margin-top: 1.25rem;
  max-width: none;
}

.saved-suggestions-intro {
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.saved-suggestions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.saved-suggestion-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  background: #fff;
}

.saved-suggestion-item__info {
  min-width: 0;
  flex: 1;
}

.saved-suggestion-item__number {
  font-weight: 700;
  color: var(--bericap-blue);
}

.saved-suggestion-item__date {
  font-size: 0.82rem;
  color: var(--text-muted, var(--text-secondary));
  margin-top: 0.15rem;
}

.saved-suggestion-item__actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.kvkk-consent-box {
  padding: 1rem 1.25rem;
  background: #f8f9fa;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
}

.kvkk-consent-box__title {
  margin: 0 0 0.75rem;
  font-size: 1rem;
  color: var(--text-primary);
}

.kvkk-consent-box__content {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 1rem;
  padding: 0.75rem;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius-sm, 6px);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-secondary, #555);
  white-space: pre-wrap;
}

.kvkk-consent-box__check {
  align-items: flex-start;
  font-size: 0.9rem;
  line-height: 1.5;
}

#kvkk-section.kvkk-consent-box--highlight .kvkk-consent-box {
  box-shadow: 0 0 0 3px rgba(0, 86, 179, 0.25);
}

/* Track page */
.track-details {
  display: grid;
  gap: 1rem;
}

.detail-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.25rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

@media (min-width: 600px) {
  .detail-row {
    grid-template-columns: 180px 1fr;
    align-items: start;
  }
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row__label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

.detail-row__value {
  font-size: 0.95rem;
}

.track-content-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border-color);
}

.track-content-section__title {
  margin: 0 0 0.65rem;
  font-size: 1rem;
  color: var(--bericap-blue);
}

.track-content-section__body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-primary);
  white-space: pre-wrap;
  word-break: break-word;
  background: #fff;
  padding: 0.875rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  min-height: 2.75rem;
}

.track-content-section__body .text-muted {
  color: var(--text-muted, var(--text-secondary));
  font-style: italic;
}

.track-details--compact {
  margin-top: 0.75rem;
}

.track-content-section--nested {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px dashed var(--border-color);
}

.track-content-section__subtitle {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
  color: var(--bericap-blue);
}

.track-result-message {
  margin: 0;
  padding: 0.875rem 1rem;
  background: #f0f9f4;
  border: 1px solid #b8dfc8;
  border-radius: 8px;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-primary);
}

/* Status badges */
.badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.badge--beklemede { background: #fff3cd; color: #856404; }
.badge--incelemede { background: #cfe2ff; color: #084298; }
.badge--onaylandi { background: #d1e7dd; color: #0f5132; }
.badge--reddedildi { background: #f8d7da; color: #842029; }
.badge--tamamlandi { background: #e2e3e5; color: #41464b; }
.badge--ekonay { background: #cff4fc; color: #055160; }
.badge--degerlendirme { background: #e0cffc; color: #432874; }

/* Timeline */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
}

.timeline__item {
  position: relative;
  padding-left: 1.5rem;
  padding-bottom: 1.25rem;
}

.timeline__item::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 8px;
  bottom: 0;
  width: 2px;
  background: var(--border-color);
}

.timeline__item:last-child::before {
  display: none;
}

.timeline__item::after {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bericap-orange);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--bericap-orange);
}

.timeline__date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.timeline__status {
  font-weight: 600;
  font-size: 0.9rem;
}

.timeline__note {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

/* Alerts */
.alert {
  padding: 0.875rem 1rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert--error {
  background: #f8d7da;
  color: #842029;
  border: 1px solid #f5c2c7;
}

.alert--success {
  background: #d1e7dd;
  color: #0f5132;
  border: 1px solid #badbcc;
}

.alert--info {
  background: #cff4fc;
  color: #055160;
  border: 1px solid #b6effb;
}

/* Loading */
.loading {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border-color);
  border-top-color: var(--bericap-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1rem;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Toast */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  max-width: 360px;
}

.toast {
  padding: 0.875rem 1.25rem;
  border-radius: 8px;
  color: #fff;
  font-size: 0.9rem;
  box-shadow: var(--shadow-md);
  animation: slideIn 0.3s ease;
}

.toast--success { background: var(--success); }
.toast--error { background: var(--danger); }
.toast--info { background: var(--bericap-blue); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Footer */
.site-footer {
  text-align: center;
  padding: 1.5rem 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border-color);
  margin-top: auto;
}

/* Utilities */
.hidden { display: none !important; }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-2 { margin-bottom: 1rem; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
