/* Support Desk Design — mobile first */

:root {
  --color-primary: #007C88;
  --color-primary-light: #009DAB;
  --color-primary-dark: #006470;
  --color-bg-page: #F3F6FB;
  --color-card: #FFFFFF;
  --color-text-heading: #1C293B;
  --color-text-body: #37516C;
  --color-text-muted: #A8BACD;
  --color-border: #E5E9EF;
  --color-button-grey: #DFE5EB;
  --color-success: #16a34a;
  --color-danger: #dc2626;
  --color-warning: #d97706;
  --font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --wrapper-max: 940px;
  --card-radius: 5px;
  --button-radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-family);
  font-size: 16px;
  color: var(--color-text-heading);
  background: var(--color-card);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

::selection {
  background: rgba(0, 124, 136, 0.2);
}

/* Header */
.site-header {
  position: relative;
  padding: 14px 0 22px;
  background-color: var(--color-primary);
  overflow: hidden;
  flex-shrink: 0;
}

.header-background {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: url("/assets/header-background.jpg");
  background-size: cover;
  background-position: center;
}

.header-content {
  position: relative;
  z-index: 1;
  width: var(--wrapper-max);
  max-width: calc(100% - 18px);
  margin: 0 auto;
}

.header-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-bottom: 18px;
  gap: 12px;
}

.header-logo img {
  height: 40px;
  display: block;
}

.header-logo {
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switcher,
.website-link {
  height: 34px;
  line-height: 33px;
  border-radius: 6px;
  font-size: 12px;
  letter-spacing: 0.25px;
  transition: background 0.15s linear, box-shadow 0.15s linear, transform 0.15s linear;
}

.lang-switcher {
  position: relative;
  background: #fff;
  padding: 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-current {
  display: flex;
  align-items: center;
  gap: 6px;
}

.lang-current::after {
  content: "";
  width: 10px;
  height: 6px;
  background-image: url("/assets/icons/dropdown-arrow.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.lang-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 160px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  box-shadow: 0 14px 36px 0 rgba(0, 0, 0, 0.06);
  padding: 6px 0;
  list-style: none;
  margin: 0;
  z-index: 10;
}

.lang-switcher[aria-expanded="true"] .lang-dropdown {
  display: block;
}

.lang-dropdown a {
  display: block;
  padding: 0 14px;
  color: var(--color-text-heading);
  text-decoration: none;
  font-size: 12px;
  line-height: 28px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lang-dropdown a:hover,
.lang-dropdown a[aria-current="true"] {
  background-color: #EBEFF3;
}

.flag {
  width: 18px;
  height: 13px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  display: inline-block;
}

.flag-gb {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'%3E%3CclipPath id='t'%3E%3Cpath d='M0 0v30h60V0z'/%3E%3C/clipPath%3E%3Cg clip-path='url(%23t)'%3E%3Cpath d='M0 0v30h60V0z' fill='%23012469'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23fff' stroke-width='6'/%3E%3Cpath d='M0 0l60 30M60 0L0 30' stroke='%23C8102E' stroke-width='4'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23fff' stroke-width='10'/%3E%3Cpath d='M30 0v30M0 15h60' stroke='%23C8102E' stroke-width='6'/%3E%3C/g%3E%3C/svg%3E");
}

.website-link {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  padding: 0 14px;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.website-link:hover {
  background: rgba(255, 255, 255, 0.25);
}

.header-title {
  color: #fff;
  text-align: center;
  font-size: 20px;
  line-height: 26px;
  letter-spacing: 0.1px;
  padding-top: 6px;
  margin: 0 0 14px;
  font-weight: 700;
}

.header-search {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  position: relative;
}

.header-search::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  background-image: url("/assets/icons/search.svg");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  z-index: 2;
}

.header-search input {
  width: 100%;
  height: 48px;
  padding: 0 16px 0 46px;
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.25);
  color: #fff;
  font-family: var(--font-family);
  font-size: 15px;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
  transition: background-color 0.1s linear, box-shadow 0.1s linear, color 0.1s linear;
}

.header-search input::placeholder {
  color: #fff;
}

.header-search input:hover {
  background: rgba(255, 255, 255, 0.3);
}

.header-search input:focus {
  outline: none;
  background: #fff;
  color: var(--color-text-heading);
  box-shadow: 0 4px 10px 0 rgba(0, 0, 0, 0.2);
}

.header-search input:focus::placeholder {
  color: var(--color-text-heading);
}

/* Main content */
.page-body {
  flex: 1;
  background: var(--color-bg-page);
  padding: 32px 0 80px;
}

.wrapper {
  width: var(--wrapper-max);
  max-width: calc(100% - 18px);
  margin: 0 auto;
}

.section-title {
  font-size: 19px;
  font-weight: 900;
  color: var(--color-text-heading);
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.featured-icon {
  width: 22px;
  height: 22px;
  margin-top: -3px;
}

/* Cards */
.card {
  display: block;
  background: var(--color-card);
  border-radius: var(--card-radius);
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.04);
  text-decoration: none;
  color: var(--color-text-heading);
  transition: background 0.15s linear, border-color 0.15s linear, box-shadow 0.15s linear, transform 0.15s linear;
}

.card:hover {
  box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.065);
}

.card:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.065);
}

.card-form {
  padding: 24px 20px;
  max-width: 520px;
  margin: 0 auto;
}

.card-form h1 {
  font-size: 22px;
  font-weight: 900;
  margin: 0 0 6px;
  color: var(--color-text-heading);
}

.card-form .lead {
  margin: 0 0 22px;
  color: var(--color-text-body);
  font-size: 15px;
}

/* Form elements */
.form-group {
  margin-bottom: 16px;
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text-heading);
}

input[type='text'],
input[type='email'],
input[type='tel'],
input[type='password'],
input[type='search'],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  font-family: var(--font-family);
  font-size: 15px;
  background: #fff;
  color: var(--color-text-heading);
  transition: border-color 0.15s linear, box-shadow 0.15s linear;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 124, 136, 0.15);
}

textarea {
  resize: vertical;
  min-height: 110px;
}

select {
  appearance: none;
  background-image: url("/assets/icons/dropdown-arrow.svg");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px 7px;
  padding-right: 34px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 44px;
  padding: 0 25px;
  border-radius: var(--button-radius);
  border: 1px solid rgba(0, 0, 0, 0.1);
  font-family: var(--font-family);
  font-size: 13.05px;
  font-weight: 500;
  letter-spacing: 0.15px;
  line-height: 41px;
  text-decoration: none;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.08);
  transition: border-color 0.15s linear, box-shadow 0.15s linear, transform 0.15s linear, background 0.15s linear;
  cursor: pointer;
  width: 100%;
}

.btn:hover {
  border-color: rgba(0, 0, 0, 0.25);
}

.btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.125);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-accent {
  background: var(--color-primary);
  color: #fff;
}

.btn-accent:hover {
  background: var(--color-primary-dark);
}

.btn-grey {
  background: var(--color-button-grey);
  color: var(--color-text-heading);
}

.btn-success {
  background: var(--color-success);
  color: #fff;
}

.btn-danger {
  background: var(--color-danger);
  color: #fff;
}

/* Alerts */
.alert {
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 14px;
  margin-bottom: 18px;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.alert-info {
  background: #eff6ff;
  color: #1e40af;
  border: 1px solid #bfdbfe;
}

.alert-success {
  background: #f0fdf4;
  color: #166534;
  border: 1px solid #bbf7d0;
}

/* Code display */
.code-display {
  background: #111827;
  color: #22c55e;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 24px;
  letter-spacing: 4px;
  padding: 18px;
  border-radius: 6px;
  text-align: center;
  margin-bottom: 18px;
}

.text-center {
  text-align: center;
}

.hidden {
  display: none !important;
}

.success-icon {
  font-size: 52px;
  text-align: center;
  margin-bottom: 14px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  background: #fff;
  flex-shrink: 0;
}

.footer-cta {
  padding: 36px 0;
}

.footer-cta .wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 20px;
}

.footer-text {
  flex: 1;
}

.footer-title {
  color: var(--color-text-heading);
  font-size: 18px;
  line-height: 24px;
  letter-spacing: 0.2px;
  font-weight: 900;
  margin: 0 0 8px;
}

.footer-label {
  color: var(--color-text-body);
  font-size: 14px;
  letter-spacing: 0.1px;
  margin: 0;
}

.footer-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-buttons .btn {
  width: auto;
}

.btn-icon-left::before {
  content: "";
  width: 20px;
  height: 20px;
  margin-right: 14px;
  margin-top: -2px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.btn-chat::before {
  background-image: url("/assets/icons/chat.svg");
}

.btn-email::before {
  background-image: url("/assets/icons/email.svg");
}

.footer-copyright {
  border-top: 1px solid var(--color-border);
}

.footer-copyright .wrapper {
  padding: 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-body);
  font-size: 13px;
}

/* Admin dashboard */
.admin-body {
  display: block;
}

.admin-body .page-body {
  padding-top: 24px;
}

.admin-card {
  padding: 20px;
}

.admin-header {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.admin-header h1 {
  font-size: 20px;
  font-weight: 900;
  margin: 0;
}

.admin-header .lead {
  margin: 0;
  color: var(--color-text-body);
  font-size: 14px;
}

.connection-status {
  align-self: flex-start;
}

.submission-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.submission {
  border: 1px solid var(--color-border);
  border-radius: var(--card-radius);
  padding: 16px;
  background: #fff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.04);
}

.submission-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
}

.submission-title {
  font-weight: 700;
  font-size: 15px;
  word-break: break-word;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.badge-awaiting {
  background: #dbeafe;
  color: #1e40af;
}

.badge-approved {
  background: #dcfce7;
  color: #166534;
}

.badge-declined {
  background: #fee2e2;
  color: #991b1b;
}

.submission dl {
  margin: 0 0 14px;
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 6px 10px;
}

.submission dt {
  color: var(--color-text-muted);
  font-size: 12px;
}

.submission dd {
  margin: 0;
  font-size: 13px;
  color: var(--color-text-body);
  word-break: break-word;
}

.actions {
  display: flex;
  gap: 10px;
}

.actions .btn {
  width: auto;
  flex: 1;
}

.empty-state {
  text-align: center;
  color: var(--color-text-muted);
  padding: 40px 0;
}

/* Tablet */
@media screen and (min-width: 640px) {
  .header-content {
    max-width: calc(100% - 40px);
  }

  .header-logo img {
    height: 48px;
  }

  .header-actions {
    gap: 12px;
  }

  .lang-switcher,
  .website-link {
    height: 38px;
    line-height: 37px;
    font-size: 13.5px;
  }

  .website-link {
    padding: 0 22px;
  }

  .header-title {
    font-size: 22px;
    line-height: 30px;
    margin-bottom: 12px;
  }

  .header-search input {
    height: 50px;
    padding-left: 52px;
    font-size: 16px;
  }

  .header-search::before {
    left: 20px;
  }

  .page-body {
    padding-top: 48px;
    padding-bottom: 100px;
  }

  .wrapper {
    max-width: calc(100% - 40px);
  }

  .section-title {
    font-size: 21.6px;
    margin-bottom: 26px;
  }

  .card-form {
    padding: 32px;
  }

  .card-form h1 {
    font-size: 24px;
  }

  .admin-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }

  .admin-header h1 {
    font-size: 22px;
  }

  .footer-cta .wrapper {
    flex-direction: row;
    text-align: left;
    justify-content: space-between;
  }

  .footer-buttons {
    flex-wrap: nowrap;
  }

  .footer-title {
    font-size: 19.8px;
    margin-bottom: 10px;
  }
}

/* Desktop */
@media screen and (min-width: 980px) {
  .page-body {
    padding-top: 56px;
    padding-bottom: 114px;
  }

  .footer-cta {
    padding: 58px 0;
  }
}
