/* =====================================================================
   Author book submission page (/submit-book)
   ===================================================================== */
.sb-section { padding: 60px 0 90px; background: linear-gradient(180deg, #fbf8f7 0%, #fff 100%); }

/* Cards */
.sb-card { position: relative; background: #fff; border: 1px solid #eeeef3; border-radius: 22px; padding: 28px 30px 32px; margin: 0 0 24px; box-shadow: 0 18px 40px -30px rgba(17, 17, 44, .35); min-width: 0; transition: border-color .3s, box-shadow .3s; }
.sb-card::before { content: ""; position: absolute; left: 30px; right: 30px; top: -1px; height: 3px; border-radius: 0 0 4px 4px; background: linear-gradient(90deg, var(--theme), #ffb199); opacity: 0; transition: opacity .3s; }
.sb-card:focus-within { border-color: #ffd9d3; box-shadow: 0 22px 50px -30px rgba(255, 123, 107, .45); }
.sb-card:focus-within::before { opacity: 1; }
.sb-card legend { float: left; width: 100%; display: flex; align-items: center; gap: 14px; font-size: 21px; font-weight: 800; color: var(--header); margin: 0 0 24px; padding: 0 0 18px; border-bottom: 1px dashed #ececf2; line-height: 1.25; }
.sb-card legend > span { width: 42px; height: 42px; flex-shrink: 0; border-radius: 14px; background: #fff1ef; color: var(--theme); font-size: 17px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; transition: background .3s, color .3s; }
.sb-card legend small { display: block; font-size: 13.5px; font-weight: 500; color: #8d8d99; margin-top: 3px; }
.sb-card legend + * { clear: both; }
.sb-card.is-complete legend > span { background: #2e9e5b; color: #fff; font-size: 0; }
.sb-card.is-complete legend > span::before { content: "\f00c"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; font-size: 16px; }
.sb-sub { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: #8d8d99; margin-top: 8px; }
.sb-sub::after { content: ""; flex: 1; height: 1px; background: #ececf2; }
.sb-sub i { color: var(--theme); }

/* Fields */
.sb-field label, .sb-label { display: block; font-size: 14px; font-weight: 600; color: var(--header); margin-bottom: 8px; }
.sb-field label b, .sb-label b { color: #e25555; }
.sb-field label i, .sb-label i { font-style: normal; font-weight: 500; color: #a0a0ab; }
.sb-field input[type=text], .sb-field input[type=email], .sb-field input[type=tel], .sb-field input[type=number], .sb-field input[type=date], .sb-field textarea, .sb-field select {
  width: 100%; min-height: 52px; border: 1.5px solid #e6e6ee; background: #fafafc; border-radius: 14px; padding: 12px 16px; font-size: 15px; color: var(--header) !important; outline: none; transition: border-color .2s, box-shadow .2s, background .2s; }
.sb-field input:hover, .sb-field textarea:hover, .sb-field select:hover { border-color: #d6d6e0; }
.sb-field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }
.sb-field select { appearance: none; -webkit-appearance: none; padding-right: 42px; background: #fafafc url("../img/chevron-down.svg") no-repeat right 16px center / 11px; cursor: pointer; }
.sb-field input:focus, .sb-field textarea:focus, .sb-field select:focus { border-color: var(--theme); background-color: #fff; box-shadow: 0 0 0 4px rgba(255, 123, 107, .14); }
.sb-field input::placeholder, .sb-field textarea::placeholder { color: #b0b0bb; }
.sb-field input[type=date] { cursor: pointer; }
.sb-field input[type=date]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.sb-field input[type=number] { -moz-appearance: textfield; }
.sb-field input[type=number]::-webkit-outer-spin-button, .sb-field input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.sb-field.has-error input, .sb-field.has-error textarea, .sb-field.has-error select, .sb-field.has-error .sb-upload, .sb-field.has-error .sb-prefix { border-color: #e07a7a !important; background-color: #fff8f8; }
.sb-field .field-error { display: flex; align-items: center; gap: 6px; margin-top: 7px; font-size: 13px; color: #c0392b; }
.sb-field .field-error::before { content: "\f06a"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; }
.sb-prefix { display: flex; align-items: stretch; border: 1.5px solid #e6e6ee; border-radius: 14px; overflow: hidden; background: #fafafc; transition: border-color .2s, box-shadow .2s; }
.sb-prefix:focus-within { border-color: var(--theme); background: #fff; box-shadow: 0 0 0 4px rgba(255, 123, 107, .14); }
.sb-prefix span { display: flex; align-items: center; padding: 0 14px; background: #f1f1f6; color: var(--header); font-weight: 700; font-size: 14px; border-right: 1.5px solid #e6e6ee; }
.sb-prefix input { border: 0 !important; box-shadow: none !important; border-radius: 0 !important; }
.sb-counter { text-align: right; font-size: 12px; color: #a0a0ab; margin-top: 6px; transition: color .2s; }
.sb-counter.ok { color: #2e9e5b; font-weight: 600; }
.sb-counter.ok::before { content: "\f00c"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; margin-right: 5px; }

/* Malayalam text needs a Malayalam-capable font and taller lines */
[lang="ml"], .ml-text { font-family: "Noto Sans Malayalam", "Inter", system-ui, sans-serif; line-height: 1.75; }

/* Upload tiles */
.sb-field .sb-upload, .sb-upload { display: flex; align-items: center; gap: 20px; border: 2px dashed #ecd9d5; border-radius: 18px; padding: 18px; cursor: pointer; background: #fffafa; transition: border-color .2s, background .2s, transform .2s; margin: 0; }
.sb-upload:hover, .sb-upload.is-drag { border-color: var(--theme); background: #fff3f1; }
.sb-upload.is-drag { transform: scale(1.01); }
.sb-upload input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.sb-upload:focus-within { border-color: var(--theme); box-shadow: 0 0 0 4px rgba(255, 123, 107, .14); }
.sb-preview { flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #fff; border: 1px solid #f0e2df; color: #e4b9b1; font-size: 28px; overflow: hidden; }
.sb-preview img { width: 100%; height: 100%; object-fit: cover; }
.sb-field .sb-upload-cover { padding: 22px; }
.sb-upload-cover .sb-preview { width: 110px; height: 165px; border-radius: 8px; background: linear-gradient(160deg, #fff, #fbefed); }
.sb-upload-cover .sb-preview.has-image { box-shadow: 0 14px 26px -12px rgba(17, 17, 44, .55); border: 0; }
.sb-upload-round .sb-preview { width: 80px; height: 80px; border-radius: 50%; background: linear-gradient(160deg, #fff, #fbefed); }
.sb-upload-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sb-upload-text strong { color: var(--header); font-size: 16px; }
.sb-upload-text strong i { color: var(--theme); margin-right: 6px; }
.sb-upload-text small { color: var(--text); font-size: 13px; }
.sb-upload-text em { font-style: normal; font-size: 12.5px; color: #1d7a45; font-weight: 600; word-break: break-all; }
.sb-upload-text em:not(:empty)::before { content: "\f00c"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; margin-right: 5px; }

/* Submit bar */
.sb-submit { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--header); border-radius: 22px; padding: 22px 26px; box-shadow: 0 24px 50px -30px rgba(17, 17, 44, .7); }
.sb-submit p { margin: 0; font-size: 13.5px; color: #c6c7dd; flex: 1 1 300px; }
.sb-submit p i { color: #4cd38a; margin-right: 6px; }
.sb-submit .theme-btn { padding: 18px 38px; display: inline-flex; align-items: center; gap: 10px; font-size: 16px; }
.sb-submit .theme-btn:disabled { opacity: .7; }

/* Aside */
.sb-aside { position: sticky; top: 120px; background: radial-gradient(circle at 100% 0, rgba(255, 123, 107, .28), transparent 50%), var(--header); color: #cfd0e6; border-radius: 24px; padding: 30px; }
.sb-aside h2 { color: #fff; font-size: 24px; margin-bottom: 10px; }
.sb-aside p { color: #cfd0e6; }
.sb-aside a { color: #fff; text-decoration: underline; }
.sb-aside-h { color: #fff; font-size: 16px; margin: 0 0 14px; }
.sb-progress { background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .08); border-radius: 16px; padding: 16px 18px; margin: 20px 0 24px; }
.sb-progress-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: #fff; margin-bottom: 10px; }
.sb-progress-top b { font-size: 20px; color: #fff; }
.sb-progress-bar { height: 8px; border-radius: 8px; background: rgba(255, 255, 255, .12); overflow: hidden; }
.sb-progress-bar i { display: block; height: 100%; width: 0; border-radius: 8px; background: linear-gradient(90deg, var(--theme), #ffb199); transition: width .35s ease; }
.sb-checklist { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 8px; font-size: 14px; }
.sb-checklist li { display: flex; align-items: center; gap: 10px; transition: color .2s; }
.sb-checklist li i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .25); display: inline-flex; align-items: center; justify-content: center; font-style: normal; transition: all .25s; }
.sb-checklist li.done { color: #fff; }
.sb-checklist li.done i { background: #2e9e5b; border-color: #2e9e5b; }
.sb-checklist li.done i::before { content: "\f00c"; font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free"; font-weight: 900; font-size: 10px; color: #fff; }
.sb-steps { list-style: none; counter-reset: s; padding: 0; margin: 0 0 22px; }
.sb-steps li { counter-increment: s; position: relative; padding: 0 0 16px 46px; }
.sb-steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 32px; height: 32px; border-radius: 50%; background: var(--theme); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sb-steps li:not(:last-child)::after { content: ""; position: absolute; left: 15px; top: 34px; bottom: 2px; width: 2px; background: rgba(255, 255, 255, .12); }
.sb-steps strong { display: block; color: #fff; }
.sb-steps span { font-size: 14px; }
.sb-tips { background: rgba(255, 255, 255, .06); border-radius: 14px; padding: 16px 18px; }
.sb-tips h3 { color: #fff; font-size: 16px; margin-bottom: 8px; }
.sb-tips h3 i { color: #FFB800; }
.sb-tips ul { margin: 0; padding-left: 18px; font-size: 14px; }
.sb-tips li { margin-bottom: 4px; }
.sb-help { margin: 18px 0 0; font-size: 14px; }

/* Success */
.sb-success { max-width: 720px; margin: 0 auto; background: #fff; border-radius: 24px; padding: 44px 36px; text-align: center; box-shadow: 0 20px 50px -30px rgba(17, 17, 44, .35); }
.sb-success-icon { font-size: 64px; color: #2e9e5b; line-height: 1; margin-bottom: 16px; }
.sb-success h2 { font-size: 28px; margin-bottom: 10px; }
.sb-ref { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px 0 16px; text-align: left; }
.sb-ref div { background: #faf7f6; border-radius: 14px; padding: 14px 16px; min-width: 0; }
.sb-ref dt { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--text); }
.sb-ref dd { margin: 4px 0 0; font-weight: 700; color: var(--header); overflow-wrap: anywhere; }

@media (max-width: 991px) {
  .sb-aside { position: static; }
}
@media (max-width: 575px) {
  .sb-section { padding: 30px 0 50px; }
  .sb-card { padding: 20px 16px 24px; border-radius: 18px; }
  .sb-card::before { left: 16px; right: 16px; }
  .sb-card legend { font-size: 18px; gap: 12px; }
  .sb-card legend > span { width: 36px; height: 36px; border-radius: 12px; }
  .sb-field .sb-upload { flex-direction: column; text-align: center; }
  .sb-submit { padding: 18px 16px; }
  .sb-submit .theme-btn { width: 100%; justify-content: center; }
  .sb-ref { grid-template-columns: 1fr; }
  .sb-success { padding: 30px 18px; }
}

/* Card heading strips — soft gradient, a different tint per step */
.sb-card legend { --strip: #fff1ee; --strip-2: #fff9f7; --accent: var(--theme); width: calc(100% + 60px); margin: -28px -30px 26px; padding: 22px 30px; border-radius: 21px 21px 0 0; border-bottom: 1px solid #f1eeee; background: linear-gradient(100deg, var(--strip) 0%, var(--strip-2) 55%, #fff 100%); }
.sb-card legend > span { background: #fff; color: var(--accent); box-shadow: 0 6px 14px -8px var(--accent); }
.sb-card legend small { color: #7d7d8a; }
.sb-card[data-step="2"] legend { --strip: #eef0ff; --strip-2: #f7f8ff; --accent: #5b63e6; border-bottom-color: #eceefa; }
.sb-card[data-step="3"] legend { --strip: #e9f8f0; --strip-2: #f5fcf8; --accent: #24955a; border-bottom-color: #e6f3ec; }
.sb-card[data-step="2"]::before { background: linear-gradient(90deg, #5b63e6, #a3a8ff); }
.sb-card[data-step="3"]::before { background: linear-gradient(90deg, #24955a, #7fd8a6); }
.sb-card::before { z-index: 1; }
@media (max-width: 575px) {
  .sb-card legend { width: calc(100% + 32px); margin: -20px -16px 22px; padding: 18px 16px; border-radius: 17px 17px 0 0; }
}
