/* sms-zmenkarije.com, redesign "Lila dan 2": the profile page (profile.php) and its SMS card. Loaded after
   zk2026.css. The locked js/jquery.send.sms.js shows and hides the four results, the form and #error01 with inline
   display styles and adds no class, so every SMS state is styled from the ids and those inline styles. */

/* ---------------------------------------------------------------- profile */
/* the profile pages show only the profile: it follows the band (no strip, no search, no headline) and is the
   skip link's target (div.contentBox_002#skipNavigation1) */
.day > .contentBox_002:first-child { margin-top: 44px; scroll-margin-top: 16px; }
.readerBox { display: contents; }
.pImage figure { aspect-ratio: 380 / 478; overflow: hidden; border-radius: 8px; background: #e4d8ec; box-shadow: var(--glow-day); }
.pImage img { width: 100%; height: 100%; object-fit: cover; }
.pTitle { margin: -4px 0 14px; font: 700 32px/1.12 var(--display); color: var(--violet-deep); }
.pTitle span { color: var(--violet); }
.pb { padding: 2px 20px; border-left: 1px solid var(--line); font: 600 17px/1.4 var(--text); color: var(--ink); }
.pb:first-of-type { padding-left: 0; border-left: 0; }
.pb span { font-weight: 400; color: var(--ink-2); }
.description { margin-top: 22px; padding: 20px 24px 22px; background: var(--paper); border-radius: 10px; box-shadow: 0 1px 2px rgba(59, 23, 84, .05); }
.title001 { margin-bottom: 6px; font: 700 18px/1.2 var(--display); color: var(--violet-ink); }
.description p:not(.title001) { font: 400 17px/1.6 var(--text); color: var(--ink); max-width: 62ch; }

/* the SMS block: the one dark night on the day, with its own light */
.smsContainer {
  margin-top: 28px;
  position: relative; padding: 30px 36px 36px; border-radius: 12px;
  color: var(--on-night);
  background-color: var(--night-1);
  background-image:
    radial-gradient(42% 70% at 12% -6%, rgba(206, 96, 234, .62) 0%, rgba(176, 76, 214, .34) 38%, rgba(140, 60, 190, 0) 76%),
    radial-gradient(70% 90% at 22% 0%, rgba(120, 52, 168, .55) 0%, rgba(92, 38, 140, 0) 70%),
    linear-gradient(165deg, #43195f 0%, #3a1652 50%, var(--night-0) 100%);
  box-shadow: 0 26px 50px -30px rgba(47, 19, 69, .8);
}
.smsContainer h2 { max-width: 25em; margin-bottom: 22px; font: 700 24px/1.22 var(--display); color: var(--on-night); text-wrap: balance; }
#fallbackMSG > div { display: none; }
#sendSMS { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px 20px; }
#sendSMS .table_row { position: relative; min-width: 0; }
#sendSMS .table_row.extra, #sendSMS .submit_container { grid-column: 1 / -1; }
.smsContainer .table_row > label:first-child { display: block; margin-bottom: 7px; font: 600 15px/1.3 var(--text); color: var(--on-night-3); }
.smsContainer #prov_type,
.smsContainer .input002,
.smsContainer textarea {
  display: block; width: 100%; margin: 0; border: 1px solid transparent; border-radius: var(--radius);
  background-color: #faf6fc; color: var(--ink); font: 400 16px/1.45 var(--text);
}
.smsContainer #prov_type { height: 48px; padding: 0 40px 0 14px; }
.smsContainer .input002 { height: 48px; padding: 0 14px; }
.smsContainer textarea { min-height: 124px; padding: 12px 14px; resize: vertical; }
.smsContainer input:-webkit-autofill { -webkit-box-shadow: 0 0 0 40px #faf6fc inset; -webkit-text-fill-color: var(--ink); }
#error01 { display: none; }
.smsContainer .error p { display: flex; align-items: center; gap: 8px; margin-top: 8px; font: 600 14px/1.35 var(--text); color: #ffc6dc; }
.smsContainer .error p::before {
  content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: #ffc6dc url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18'%3E%3Cpath d='M9 4.5v5.2' stroke='%233a1652' stroke-width='2.2' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='13.1' r='1.3' fill='%233a1652'/%3E%3C/svg%3E") center / 18px no-repeat;
}
/* progressive extra: jQuery's .show() writes style="display: inline;" on #error01; the field border follows it */
.smsContainer .table_row:has(> label.error[style*="inline"]) .input002 { border-color: #ffc6dc; box-shadow: 0 0 0 1px #ffc6dc; }
/* rule fix (visible focus): with that 1px glow in its 2px offset gap, the white ring bordered the pink (1.5:1);
   1px further out a dark gap stays between them */
.smsContainer .table_row:has(> label.error[style*="inline"]) .input002:focus-visible { outline-offset: 3px; }
.smsContainer input.submit {
  appearance: none; -webkit-appearance: none; display: inline-block; min-height: 52px; min-width: 200px; margin: 4px 0 0; padding: 0 30px;
  border: 2px solid transparent; border-radius: var(--radius);
  background: linear-gradient(180deg, #9b52bf 0%, #8a46ae 50%, #7c3ca2 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 12px 24px -12px rgba(8, 0, 16, .9);
  color: #fff; font: 700 17px/1 var(--display); letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
.smsContainer input.submit:disabled {
  background: transparent; border: 2px dashed rgba(234, 217, 245, .75); box-shadow: none;
  color: #f1e6f8; cursor: progress;
}

/* results: light notes on the night (the locked script shows one and hides the form) */
#sendOK { padding: 18px 22px 20px; border-radius: 8px; background: #faf6fc; color: var(--ink); font: 400 16px/1.55 var(--text); }
#sendOK span {
  display: inline-block; margin-top: 12px; padding: 7px 18px 6px; border-radius: var(--radius);
  background: var(--violet-ink); color: #fff; font: 700 24px/1 var(--display); letter-spacing: .04em;
}
#sendERROR, #sendERROR_IP, #sendERROR_BAN {
  padding: 14px 18px 15px 16px; border-radius: 8px; border-left: 5px solid #c2366f;
  background: #fff4f8; color: #8f1d52; font: 600 16px/1.45 var(--text);
}
#sendERROR { margin-bottom: 18px; }

/* ---------------------------------------------------------------- profile layout: D aligned, built in */
/* profile.php's markup and order: section.mod_catalogreader > div.readerBox > [div.pImage, div.readerContent >
   [h2.pTitle, 3 p.pb, div.description]], then div.smsContainer. One arrangement per width range:
   - from 1000px, D's aligned desktop: the name and the three facts across the top; the photo (380x478) and the
     night SMS card side by side at one height; "Nekaj o meni" full width below the pair. .readerBox and
     .readerContent step aside (display: contents) and order places the blocks: the recorded exception to
     "markup order = visual order", allowed only because the blocks it moves (the photo, the name, the facts,
     "Nekaj o meni") hold nothing focusable; the Tab order stays the markup's;
   - 600-999.98px, D's aligned tablet: the photo on the left (260px; 240px below 720px), beside it the name,
     the facts and "Nekaj o meni" in one column level with the photo; the SMS card full width below, its fields
     side by side. The visual order is the markup's;
   - below 600px, D's phone: one column in the markup's order (the phone block below).
   The .98 ends keep a layout at fractional widths (browser zoom): 999.5px gets the tablet, not nothing. The photo
   is never sticky; it may grow taller than 380x478 (object-fit: cover crops its sides) to meet the block beside
   it: at most 20% beside the card, 30% beside the text column. */
@media (min-width: 1000px) {
  .mod_catalogreader { display: flex; flex-wrap: wrap; align-items: stretch; }
  .readerContent { display: contents; }
  .readerContent::after { content: ""; flex: 0 0 100%; }   /* ends the facts' row */
  .pTitle { flex: 1 0 100%; }
  .pImage { order: 1; flex: 0 0 380px; margin-top: 24px; display: flex; flex-direction: column; }
  .pImageContainer { flex: 1 0 auto; display: flex; flex-direction: column; }
  .pImage figure { flex: 1 0 auto; max-height: calc(478px * 1.2); }
  /* justify-content acts only when the locked script hides the form: the heading and the result then stand in
     the middle of the card. With the form shown, the form takes all the card's room. */
  .mod_catalogreader > .smsContainer { order: 2; flex: 1 1 0; min-width: 0; margin: 24px 0 0 48px; display: flex; flex-direction: column; justify-content: center; }
  .description { order: 3; flex: 1 0 100%; margin-top: 28px; }
  /* the message box is the card's flexible row: from 76px (two lines) it takes the slack, at most 260px. It is
     not draggable here: it already takes all the spare height, and a drag would push the card past the photo.
     The height is !important: a box dragged taller below 1000px keeps the inline height the resize handle
     wrote, and a window then widened past 1000px would otherwise push the card past the photo. Below 1000px
     the visitor's dragged height comes back. */
  .mod_catalogreader #sendSMS { flex: 1 0 auto; grid-template-rows: auto 1fr auto; }
  .mod_catalogreader #sendSMS .table_row.extra { display: flex; flex-direction: column; }
  .mod_catalogreader #message { flex: 1 0 auto; height: 76px !important; min-height: 76px; max-height: 260px; resize: none; }
}
/* the results beside the photo: the locked script hides the form (style="display: none;") and shows #sendOK,
   #sendERROR_IP or #sendERROR_BAN. The card keeps the photo's height there (478px), so the heading and the result
   stand centred in it, the result under a mark (a check for a sent message, the "!" of the two refusals). The marks
   are drawn on the notes (::before); the texts are the site's. A progressive extra (:has()); without it the heading
   and the notes keep the narrower widths' look, centred in the card's height. */
@media (min-width: 1000px) {
  .smsContainer:has(> #sendSMS[style*="none"]) > h2 { margin-inline: auto; text-align: center; }
  .smsContainer:has(> #sendSMS[style*="none"]) :is(#sendOK, #sendERROR_IP, #sendERROR_BAN) { max-width: 34em; margin-inline: auto; text-align: center; text-wrap: balance; }
  .smsContainer:has(> #sendSMS[style*="none"]) #sendOK { padding: 28px 28px 30px; }
  .smsContainer:has(> #sendSMS[style*="none"]) :is(#sendERROR_IP, #sendERROR_BAN) { padding: 76px 28px 78px; border-left: 0; }
  .smsContainer:has(> #sendSMS[style*="none"]) :is(#sendOK, #sendERROR_IP, #sendERROR_BAN)::before {
    content: ""; display: block; width: 64px; height: 64px; margin: 0 auto 14px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3ClinearGradient id='p' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23a35ac9'/%3E%3Cstop offset='1' stop-color='%236c2f8e'/%3E%3C/linearGradient%3E%3C/defs%3E%3Ccircle cx='32' cy='32' r='32' fill='url(%23p)'/%3E%3Cpath d='M19 33.5l9 9L45.5 24' fill='none' stroke='%23fff' stroke-width='5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 64px no-repeat;
  }
  .smsContainer:has(> #sendSMS[style*="none"]) :is(#sendERROR_IP, #sendERROR_BAN)::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Ccircle cx='32' cy='32' r='32' fill='%23c2366f'/%3E%3Cpath d='M32 16.5v21' stroke='%23fff' stroke-width='5.5' stroke-linecap='round'/%3E%3Ccircle cx='32' cy='47' r='3.7' fill='%23fff'/%3E%3C/svg%3E");
  }
}
@media (min-width: 600px) and (max-width: 999.98px) {
  .mod_catalogreader { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0 32px; align-items: stretch; }
  .pImage { grid-column: 1; grid-row: 1; display: flex; flex-direction: column; }
  .pImageContainer { flex: 1 0 auto; display: flex; flex-direction: column; }
  .pImage figure { flex: 1 0 auto; max-height: calc(260px * 478 / 380 * 1.3); }
  /* the text column is level with the photo: "Nekaj o meni" grows to the photo's foot when the text is short,
     the photo grows when it is long; the name's first line starts at the photo's top */
  .readerContent { grid-column: 2; grid-row: 1; display: flex; flex-direction: column; min-width: 0; }
  /* D's -4px: the name's capitals level with the photo's top (its line box starts 4px above it). D aligned keeps
     it from 720px; it holds at 26px (600-719.98px) too, where D sets 0 and the capitals sat 5px low. The
     selector outranks the 719.98px block's margin */
  .mod_catalogreader .pTitle { margin-top: -4px; }
  .description { flex: 1 0 auto; }
  .mod_catalogreader > .smsContainer { grid-column: 1 / -1; grid-row: 2; }
}
@media (min-width: 600px) and (max-width: 719.98px) {
  .mod_catalogreader { grid-template-columns: 240px minmax(0, 1fr); gap: 0 24px; }
  .pImage figure { max-height: calc(240px * 478 / 380 * 1.3); }
}

@media (hover: hover) {
  /* only the fill changes */
  .smsContainer input.submit:not(:disabled):hover { background: linear-gradient(180deg, #a058c6 0%, #904cb5 50%, #7f3ea5 100%); }
}
@media (max-width: 999.98px) {
  /* profile: the facts as rows (the layout per width is in "profile layout") */
  .pb { display: flex; gap: 6px; padding: 8px 0; border-left: 0; border-top: 1px solid var(--line); font-size: 16px; }
  .pb:first-of-type { border-top: 0; }
  .pb span { flex: 0 0 96px; }
  .smsContainer { padding: 26px 26px 30px; }
}
@media (max-width: 719.98px) {
  .pTitle { margin: 0 0 8px; font-size: 26px; }
  .description { margin-top: 16px; padding: 16px 18px 18px; }
  .description p:not(.title001) { font-size: 16px; }
  .smsContainer { padding: 22px 20px 24px; }
  .smsContainer h2 { font-size: 20px; margin-bottom: 18px; }
  .smsContainer input.submit { width: 100%; }
}
@media (max-width: 599.98px) {
  .pTitle { font-size: 25px; }
  .smsContainer h2 { font-size: 19px; }
  /* profile: D's phone column, in the markup's order: the photo (centred, at most 380px), the name, the facts,
     "Nekaj o meni", the SMS card (its fields one under the other) */
  .day > .contentBox_002:first-child { margin-top: 28px; }
  .pImage figure { max-width: 380px; margin-inline: auto; }
  .readerContent { margin-top: 22px; }
  .pTitle { margin: 0 0 10px; }
  .pb { padding: 9px 0; }
  #sendSMS { grid-template-columns: minmax(0, 1fr); }
  /* the SMS block stays one night object inside the gutter, with its radius */
  .smsContainer {
    margin-top: 28px; padding: 24px 18px 26px;
    background-image:
      radial-gradient(70% 46% at 16% -4%, rgba(206, 96, 234, .62) 0%, rgba(176, 76, 214, .32) 40%, rgba(140, 60, 190, 0) 78%),
      radial-gradient(90% 60% at 30% 0%, rgba(120, 52, 168, .5) 0%, rgba(92, 38, 140, 0) 70%),
      linear-gradient(170deg, #43195f 0%, #3a1652 50%, var(--night-0) 100%);
  }
}
