@import url("./styles-v2.css");

body {
  overflow: hidden;
}

.requests-main {
  min-width: 0;
  min-height: 0;
  height: calc(100vh - 20px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.requests-header,
.request-card {
  background: var(--surface-strong);
  box-shadow: var(--shadow);
  border: 1px solid #f4f4f5;
}

.requests-header {
  padding: 16px 24px;
  border-radius: var(--radius);
}

.requests-header h1 {
  margin: 0;
  font-size: 2.4rem;
  line-height: 1.03;
}

.requests-header p:last-child {
  margin: 8px 0 0;
  max-width: 780px;
  color: #586370;
  font-size: 1rem;
  line-height: 1.65;
}

.request-card {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  overflow: hidden;
}

.request-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  padding: 22px 26px 12px;
}

.request-card-head h2 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.1;
}

.request-card-head > span {
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(243, 108, 0, 0.14);
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
}

.request-form {
  min-height: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.form-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  padding: 10px 26px 8px;
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.request-form label {
  display: grid;
  gap: 8px;
}

.request-form label span {
  color: #20242a;
  font-size: 0.9rem;
  font-weight: 800;
}

.request-form input,
.request-form select,
.request-form textarea,
.store-picker-toggle {
  width: 100%;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  background: #fbfbfc;
  color: var(--text);
  padding: 13px 15px;
  font: inherit;
  font-weight: 650;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.request-form textarea {
  resize: vertical;
  min-height: 96px;
}

.request-form input:focus,
.request-form select:focus,
.request-form textarea:focus,
.store-picker-toggle:focus {
  border-color: rgba(243, 108, 0, 0.45);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(243, 108, 0, 0.08);
}

.store-picker {
  position: relative;
}

.store-picker-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  text-align: left;
}

.store-picker-toggle b {
  color: var(--accent);
  font-size: 1.1rem;
}

.store-picker-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 5;
  max-height: 240px;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.14);
}

.store-option-list {
  max-height: 180px;
  overflow: auto;
  padding: 4px 0 10px;
}

.store-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  padding: 10px 14px;
  color: #20242a;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.store-option:hover {
  background: #FFF1E8;
}

.store-option input {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}

.store-option span {
  min-width: 0;
  font-size: 0.86rem !important;
  font-weight: 700 !important;
  line-height: 1.35;
}

.store-option-all {
  border-bottom: 1px solid #f0f1f3;
  background: #FFF5ED;
}

.form-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 26px 22px;
  border-top: 1px solid #f0f1f3;
}

.request-backend-status {
  margin: 0;
  color: #64748b;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.35;
}

.request-backend-status.is-error {
  color: #b42318;
}

.form-actions button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(243, 108, 0, 0.18);
}

.form-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.success-message {
  margin: 0;
  color: #148f28;
  font-weight: 800;
  line-height: 1.35;
}

.success-modal[hidden] {
  display: none;
}

.success-modal {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 24px;
}

.success-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(3px);
}

.success-modal-card {
  position: relative;
  z-index: 1;
  width: min(460px, 100%);
  padding: 34px;
  border-radius: 30px;
  background: #fff;
  border: 1px solid #f4f4f5;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.22);
  text-align: center;
}

.success-modal-card h2 {
  margin: 0;
  color: #111;
  font-size: 2rem;
  line-height: 1.1;
}

.success-modal-card p:not(.eyebrow) {
  margin: 18px 0 24px;
  color: #586370;
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.65;
}

.success-modal-card button {
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  padding: 14px 30px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 14px 30px rgba(243, 108, 0, 0.18);
}

@media (max-width: 980px) {
  body {
    overflow: auto;
  }

  .requests-main {
    height: auto;
    min-height: calc(100vh - 28px);
  }

  .requests-header {
    padding: 26px;
  }

  .request-card {
    max-height: none;
  }

  .request-card-head,
  .form-actions,
  .form-grid {
    display: grid;
    grid-template-columns: 1fr;
  }
}
