/* Shared presentation components; only pages with body.pr-ui opt in. */
body.pr-ui {
  --pr-text: #202a32;
  --pr-background: #f3f5f5;
  --pr-primary: #16635f;
  margin: 0;
  padding: 0;
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #202a32;
  color: var(--pr-text, #202a32);
  background: #f3f5f5;
  background: var(--pr-background, #f3f5f5);
}
.pr-ui .pr-shell {
  box-sizing: border-box;
  max-width: 1120px;
  margin: 0 auto;
  padding: 32px 24px;
}
.pr-ui .pr-card {
  box-sizing: border-box;
  padding: 28px;
  background: #fff;
  border: 1px solid #dce3e3;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(37, 60, 66, .02);
}
.pr-ui .pr-login-card { max-width: 470px; margin: 42px auto; }
.pr-ui .pr-title {
  margin: 0 0 20px;
  padding: 0;
  border: 0;
  color: inherit;
  font: 700 2rem/1.2 system-ui, -apple-system, "Segoe UI", sans-serif;
  letter-spacing: -.035em;
  overflow-wrap: break-word;
}
.pr-ui .pr-intro { margin-bottom: 24px; }
.pr-ui .pr-stack { display: flex; flex-direction: column; gap: 22px; margin: 0; }
.pr-ui .pr-field { min-width: 0; }
.pr-ui .pr-field label {
  display: block;
  margin-bottom: 7px;
  font-size: .875rem;
  font-weight: 600;
  color: #33444a;
}
.pr-ui .pr-input {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: 11px 12px;
  border: 1px solid #bfcdd0;
  border-radius: 7px;
  background: #fff;
  color: #1d3036;
  font: inherit;
  line-height: 1.4;
}
.pr-ui .pr-button {
  box-sizing: border-box;
  max-width: 100%;
  padding: 11px 16px;
  border: 1px solid #16635f;
  border-radius: 7px;
  background: #16635f;
  background: var(--pr-primary, #16635f);
  color: #fff;
  font: inherit;
  font-weight: 650;
  line-height: 1.3;
  white-space: normal;
  cursor: pointer;
}
.pr-ui .pr-button:hover { background: #104c49; }
.pr-ui a { color: #166666; font-size: inherit; text-underline-offset: 3px; }
.pr-ui .pr-input:focus, .pr-ui .pr-button:focus, .pr-ui a:focus {
  outline: 3px solid #9fd2cf;
  outline-offset: 2px;
}
.pr-ui .pr-extra { margin-top: 24px; overflow-wrap: break-word; }
@media (max-width: 750px) {
  .pr-ui .pr-shell { padding: 22px 16px; }
  .pr-ui .pr-card { padding: 22px; }
  .pr-ui .pr-login-card { margin: 20px auto; }
  .pr-ui .pr-title { font-size: 1.65rem; }
}

/* Viewentry visual pilot */
body.pr-ui.pr-results {
    line-height: 1.55 !important;
}

body.pr-ui.pr-results #content {
    box-sizing: border-box;
    width: calc(100% - 32px);
    max-width: 1120px;
    margin: 24px auto;
    padding: 28px;
    border: 1px solid #dce3e3;
    border-radius: 14px;
    background: #fff;
    box-shadow: none;
}

body.pr-ui.pr-results img[src$="reportheader.png"] {
    max-width: 100%;
    height: auto;
}

body.pr-ui.pr-results .divOuter {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    text-align: left;
}

body.pr-ui.pr-results .divInner {
    box-sizing: border-box;
    float: none;
    width: auto;
    height: auto;
    margin: 0;
    padding: 16px;
    border: 1px solid #dce3e3;
    border-radius: 10px;
    background: #fff;
    text-align: center;
    overflow-wrap: anywhere;
}

body.pr-ui.pr-results .divInner a img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 10px auto 0 !important;
    padding: 0;
    border: 0;
}

@media (max-width: 600px) {
    body.pr-ui.pr-results #content {
        width: calc(100% - 20px);
        padding: 16px;
    }

    body.pr-ui.pr-results .divOuter {
        grid-template-columns: 1fr;
    }
}

/* Spacing between result categories */
body.pr-ui.pr-results .divOuter {
    margin-top: 16px;
    margin-bottom: 32px;
}

body.pr-ui.pr-results .divOuter + div[style*="clear:both"] {
    margin-bottom: 24px;
}

/* Login and access error pages */
.pr-ui .pr-message-card {
    max-width: 520px;
    margin: 42px auto;
    text-align: center;
}

.pr-ui .pr-message {
    margin: 0;
    padding: 16px 20px;
    border: 1px solid #e5d6d6;
    border-radius: 8px;
    background: #fff8f8;
    color: #803c3c;
    font-size: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

@media (max-width: 600px) {
    .pr-ui .pr-message-card {
        margin: 20px auto;
    }
}

/* Main author entry form - initial layout */
body.pr-ui.pr-entry-form #container {
    box-sizing: border-box;
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
}

body.pr-ui.pr-entry-form #header {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    min-height: 94px;
}

body.pr-ui.pr-entry-form #header img {
    max-width: 100%;
    height: auto;
}

body.pr-ui.pr-entry-form #sidebar {
    box-sizing: border-box;
    width: 230px;
}

body.pr-ui.pr-entry-form #main {
    box-sizing: border-box;
    min-width: 0;
    margin-left: 250px;
}

@media (max-width: 800px) {
    body.pr-ui.pr-entry-form #container {
        padding: 16px;
    }

    body.pr-ui.pr-entry-form #sidebar {
        float: none;
        width: 100%;
    }

    body.pr-ui.pr-entry-form #main {
        margin: 20px 0 0;
        width: 100%;
    }
}

/* Author entry form controls */
body.pr-ui.pr-entry-form #myform input[type="text"],
body.pr-ui.pr-entry-form #myform input:not([type]),
body.pr-ui.pr-entry-form #myform input[type="email"],
body.pr-ui.pr-entry-form #myform select {
    box-sizing: border-box;
    max-width: 100%;
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid #bfcdd0;
    border-radius: 6px;
    background: #fff;
    color: #202a32;
    font: 14px/1.4 system-ui, sans-serif;
}

body.pr-ui.pr-entry-form #myform input:focus,
body.pr-ui.pr-entry-form #myform select:focus {
    outline: 2px solid #9fd2cf;
    outline-offset: 1px;
    border-color: #16635f;
}

body.pr-ui.pr-entry-form #myform input.button {
    box-sizing: border-box;
    min-height: 38px;
    padding: 8px 16px;
    border: 1px solid #16635f;
    border-radius: 7px;
    background: #16635f;
    color: #fff;
    font: 600 14px/1.3 system-ui, sans-serif;
    cursor: pointer;
}

/* Responsive personal details form */
body.pr-ui.pr-entry-form .pr-personal-fields {
    display: grid;
    grid-template-columns: minmax(130px, 190px) minmax(0, 1fr);
    gap: 14px 20px;
    align-items: center;
}

body.pr-ui.pr-entry-form .pr-personal-row {
    display: contents;
}

body.pr-ui.pr-entry-form .pr-personal-label {
    font-weight: 600;
    text-align: right;
}

body.pr-ui.pr-entry-form .pr-personal-control {
    min-width: 0;
    text-align: left;
}

@media (max-width: 700px) {
    body.pr-ui.pr-entry-form .pr-personal-fields {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    body.pr-ui.pr-entry-form .pr-personal-label {
        margin-top: 14px;
        margin-bottom: 6px;
        text-align: left;
    }
}

/* Mobile layout for photo upload fields */
@media (max-width: 700px) {
    body.pr-ui.pr-entry-form #myform .spacer {
        height: auto;
        min-height: 0;
        margin: 0 0 18px;
        padding: 12px 0;
        text-align: left;
        line-height: 1.6;
    }

    body.pr-ui.pr-entry-form #myform .spacer input[id^="title_"] {
        display: block;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        margin: 6px 0 10px;
    }

    body.pr-ui.pr-entry-form #myform .spacer input[type="file"] {
        display: block;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        margin: 6px 0 0;
    }
}

/* Šira polja za osobne podatke */
body.pr-ui.pr-entry-form .pr-personal-control input:not([type="checkbox"]):not([type="hidden"]),
body.pr-ui.pr-entry-form .pr-personal-control select {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
}

/* Poštanski broj ostaje kraći */
body.pr-ui.pr-entry-form .pr-personal-control #postna_stevilka {
    width: 110px;
}

/* Na mobitelu ostavi prostor za ikone pomoći */
@media (max-width: 700px) {
    body.pr-ui.pr-entry-form .pr-personal-control input:not([type="checkbox"]):not([type="hidden"]),
    body.pr-ui.pr-entry-form .pr-personal-control select {
        width: 100%;
    }

    body.pr-ui.pr-entry-form .pr-personal-control #postna_stevilka {
        width: 110px;
    }
}

/* Ikone pomoći uz osobne podatke */
body.pr-ui.pr-entry-form .pr-personal-control {
    position: relative;
    padding-right: 34px;
}

body.pr-ui.pr-entry-form .pr-personal-control input:not([type="checkbox"]),
body.pr-ui.pr-entry-form .pr-personal-control select {
    max-width: 100%;
}

body.pr-ui.pr-entry-form .pr-personal-control a.jTip {
    position: absolute;
    right: 2px;
    top: 8px;
}

body.pr-ui.pr-entry-form .pr-personal-control a.jTip img {
    vertical-align: middle;
}

/* Prostor između naslova okvira i prvog polja */
body.pr-ui.pr-entry-form .pr-personal-fields {
    padding-top: 24px;
}

/* Kompaktniji mobilni prikaz uploada */
@media (max-width: 700px) {
    body.pr-ui.pr-entry-form #myform .spacer {
        margin-bottom: 8px;
        padding: 8px 0;
    }

    body.pr-ui.pr-entry-form #myform .spacer input[id^="title_"] {
        margin: 4px 0 6px;
    }

    body.pr-ui.pr-entry-form #myform .spacer input[type="file"] {
        margin: 4px 0 0;
    }
}

/* Ujednačena veličina svih informacijskih ikona */
body.pr-ui.pr-entry-form #myform a.jTip img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* Uljepšavanje gumba za odabir datoteke */
body.pr-ui.pr-entry-form #myform input[type="file"] {
    font: inherit;
    font-size: 14px;
    color: inherit;
}

body.pr-ui.pr-entry-form #myform input[type="file"]::file-selector-button {
    background: #16635f;
    color: #fff;
    border: 1px solid #16635f;
    border-radius: 6px;
    padding: 9px 14px;
    margin-right: 10px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: background-color .15s ease;
}

body.pr-ui.pr-entry-form #myform input[type="file"]::file-selector-button:hover {
    background: #104c49;
}

body.pr-ui.pr-entry-form #myform input[type="file"]::file-selector-button:active {
    background: #0c3d3a;
}

/* Informacijska ikona neposredno uz naslov odjeljka */
body.pr-ui.pr-entry-form #myform legend .pr-section-help {
    display: inline-flex;
    position: static;
    vertical-align: middle;
    margin-left: 8px;
    align-items: center;
}

body.pr-ui.pr-entry-form #myform legend .pr-section-help img {
    display: block;
    width: 24px;
    height: 24px;
    object-fit: contain;
}
/* File selection status below the native green button. */
body.pr-ui.pr-entry-form #myform .spacer {
    height: auto;
    min-height: 2.6em;
    padding-bottom: 10px;
}

body.pr-ui.pr-entry-form #myform .pr-file-control {
    display: inline-block;
    width: 240px;
    max-width: 100%;
    vertical-align: top;
    text-align: left;
}

body.pr-ui.pr-entry-form #myform .pr-file-control input[type="file"] {
    box-sizing: border-box;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: transparent;
    font-size: 0;
}

body.pr-ui.pr-entry-form #myform .pr-file-control input[type="file"]::file-selector-button {
    margin-right: 0;
    font: 600 14px/1.4 system-ui, sans-serif;
}

body.pr-ui.pr-entry-form #myform .pr-file-status {
    display: block;
    margin-top: 6px;
    color: #202a32;
    font: 14px/1.4 system-ui, sans-serif;
    overflow-wrap: anywhere;
}

/* Keep legacy JTip help frames within the mobile viewport. */
@media (max-width: 800px) {
    body.pr-ui.pr-entry-form #JT {
        box-sizing: border-box;
        left: 12px !important;
        width: calc(100% - 24px) !important;
        max-width: 540px;
        overflow-wrap: anywhere;
    }

    body.pr-ui.pr-entry-form #JT_arrow_left,
    body.pr-ui.pr-entry-form #JT_arrow_right {
        display: none;
    }

    body.pr-ui.pr-entry-form #JT_copy {
        overflow-x: auto;
    }

    body.pr-ui.pr-entry-form #JT_copy img {
        box-sizing: border-box;
        max-width: 100%;
        height: auto;
    }
}

/* Localized picker with the original file input over its visible label. */
body.pr-ui.pr-entry-form #myform .pr-file-label {
    display: inline-block;
    margin: 0 6px 0 12px;
    vertical-align: top;
    line-height: 40px;
}

body.pr-ui.pr-entry-form #myform .pr-file-picker {
    display: inline-block;
    position: relative;
    box-sizing: border-box;
    padding: 9px 14px;
    border: 1px solid #16635f;
    border-radius: 6px;
    background: #16635f;
    color: #fff;
    font: 600 14px/1.4 system-ui, sans-serif;
    white-space: nowrap;
    cursor: pointer;
}

body.pr-ui.pr-entry-form #myform .pr-file-picker:hover { background: #104c49; }
body.pr-ui.pr-entry-form #myform .pr-file-picker:focus-within {
    outline: 2px solid #9fd2cf;
    outline-offset: 2px;
}

body.pr-ui.pr-entry-form #myform .pr-file-picker input[type="file"] {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}

body.pr-ui.pr-entry-form #myform input.button {
    width: auto;
    min-width: 130px;
    min-height: 48px;
    padding: 12px 16px;
    font-size: 16px;
}

@media (max-width: 700px) {
    body.pr-ui.pr-entry-form #myform .pr-file-label {
        width: 2.5rem;
        margin: 0;
    }

    body.pr-ui.pr-entry-form #myform .pr-file-control {
        display: inline-flex;
        width: calc(100% - 3rem);
        align-items: center;
        gap: 8px;
    }

    body.pr-ui.pr-entry-form #myform .pr-file-picker { flex: 0 0 auto; }
    body.pr-ui.pr-entry-form #myform .pr-file-status {
        flex: 1;
        min-width: 0;
        margin-top: 0;
    }
}


/* Reserve a visible icon beside every section title. */
body.pr-ui.pr-entry-form #myform legend .pr-section-help {
    width: 24px;
    height: 24px;
    min-width: 24px;
    flex-shrink: 0;
}

body.pr-ui.pr-entry-form #JT .pr-help-close {
    float: right;
    position: relative;
    z-index: 1;
    min-width: 36px;
    min-height: 36px;
    margin: 0;
    padding: 2px 8px;
    border: 0;
    background: #ccc;
    color: #202a32;
    font: 24px/1.2 system-ui, sans-serif;
    cursor: pointer;
}

body.pr-ui.pr-entry-form #JT_close_left,
body.pr-ui.pr-entry-form #JT_close_right {
    min-height: 36px;
    box-sizing: border-box;
    padding-right: 40px;
}


/* Keep icons on the vertical centre of their title or field. */
body.pr-ui.pr-entry-form #myform legend {
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 15px);
}

body.pr-ui.pr-entry-form .pr-personal-control a.jTip {
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Desktop upload rows span the available fieldset width. */
@media (min-width: 701px) {
    body.pr-ui.pr-entry-form #myform .spacer {
        display: grid;
        grid-template-columns: auto minmax(0, 1fr) auto minmax(0, max-content);
        align-items: center;
        gap: 8px;
        text-align: left;
    }

    body.pr-ui.pr-entry-form #myform .spacer input[id^="title_"] {
        width: 100%;
        min-width: 0;
        margin: 0;
    }

    body.pr-ui.pr-entry-form #myform .pr-file-label {
        margin: 0;
        line-height: inherit;
    }

    body.pr-ui.pr-entry-form #myform .pr-file-control {
        display: flex;
        width: auto;
        max-width: 260px;
        min-width: 0;
        align-items: center;
        gap: 8px;
    }

    body.pr-ui.pr-entry-form #myform .pr-file-picker { flex: 0 0 auto; }
    body.pr-ui.pr-entry-form #myform .pr-file-status {
        flex: 1;
        min-width: 0;
        margin: 0;
        text-align: left;
    }
}


/* The visible button opens the original file input synchronously. */
body.pr-ui.pr-entry-form #myform .pr-file-control > input.pr-native-file[type="file"] {
    display: none !important;
}


/* Report oversized files next to their own picker immediately. */
body.pr-ui.pr-entry-form #myform .pr-file-status.pr-file-error {
    color: #a32222;
    font-weight: 600;
}

body.pr-ui.pr-entry-form #myform .pr-file-picker[aria-invalid="true"] {
    border-color: #a32222;
    box-shadow: 0 0 0 2px #f3c2c2;
}


/* Photograph replacement uses the shared application cards and controls. */
body.pr-ui.pr-replace .pr-shell { max-width: 1000px; }
.pr-replace .pr-replace-header { margin-bottom: 22px; }
.pr-replace .pr-replace-header nav { display: flex; flex-wrap: wrap; gap: 12px 24px; }
.pr-replace .pr-replace-intro { margin: 22px 0; }
.pr-replace .pr-replace-card { margin: 0 0 22px; }
.pr-replace .pr-replace-photo-title { margin: 0 0 22px; color: inherit; font: 650 1.2rem/1.4 system-ui, sans-serif; }
.pr-replace .pr-replace-layout { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 28px; }
.pr-replace .pr-replace-preview { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px; border-radius: 8px; background: #f3f5f5; align-self: start; }
.pr-replace .pr-replace-preview img { display: block; max-width: 100%; max-height: 150px; object-fit: contain; }
.pr-replace .pr-replace-preview span { color: #52666b; font-size: .8rem; text-align: center; }
.pr-replace .pr-input { display: block; margin-top: 7px; }
.pr-replace .pr-replace-picker { display: block; margin-top: 7px; font-size: 14px; padding: 9px 14px; }
.pr-replace .pr-replace-file-status { display: block; margin-top: 7px; font-size: .875rem; font-weight: 400; overflow-wrap: anywhere; }
.pr-replace .pr-replace-native-file { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; border: 0; }
.pr-replace .pr-replace-error { color: #a32222; border-color: #e5c0c0; }
.pr-replace .pr-replace-success { color: #16635f; border-color: #a7cfca; }
.pr-replace .pr-replace-notice { margin-top: 22px; }
@media (max-width: 600px) {
    .pr-replace .pr-replace-layout { grid-template-columns: minmax(0, 1fr); gap: 22px; }
    .pr-replace .pr-replace-preview { max-width: 200px; }
}


.pr-replace .pr-replace-selected-preview { margin: 14px 0 0; padding: 14px; border: 1px solid #bfcdd0; border-radius: 8px; background: #f3f5f5; }
.pr-replace .pr-replace-selected-preview img { display: block; max-width: 100%; max-height: 240px; margin: 0 auto; object-fit: contain; }
.pr-replace .pr-replace-selected-preview figcaption { margin-top: 10px; color: #33444a; font-size: .875rem; }

/* Entry confirmation: shared cards, with payment above the photo overview. */
body.pr-ui.pr-confirmation #header-zahvala {
    width: 100%;
    height: auto;
    min-height: 94px;
    margin-bottom: 24px;
    border-bottom: 1px solid #dce3e3;
    text-align: center;
}
.pr-confirmation #header-zahvala img { max-width: 100%; height: auto; }
.pr-confirmation .okvir {
    display: flex;
    flex-direction: column;
    gap: 24px;
    width: auto;
    margin: 0;
    border: 0;
    position: static;
}
.pr-confirmation .levo {
    order: -1;
    position: static;
    width: auto;
    margin: 0;
    background-image: none;
    text-align: left;
    border-top: 4px solid #16635f;
}
.pr-confirmation .zahvala, .pr-confirmation .maincopy { font: inherit; }
.pr-confirmation .zahvala { display: block; overflow-wrap: anywhere; }
.pr-confirmation .thumbs { display: grid; gap: 20px; margin: 0; }
.pr-confirmation .sectionbox {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 20px;
    float: none;
    margin: 0;
    padding: 24px;
    border: 1px solid #dce3e3;
    border-radius: 14px;
    background: #fff;
}
.pr-confirmation .naslov {
    float: none;
    width: auto;
    color: #16635f;
    font: 700 2rem/1.2 system-ui, sans-serif;
}
.pr-confirmation .desno { float: none; width: auto; min-width: 0; }
.pr-confirmation .maincopy {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.pr-confirmation .slika {
    box-sizing: border-box;
    float: none;
    width: auto;
    margin: 0;
    padding: 12px;
    border: 1px solid #dce3e3;
    border-radius: 8px;
    background: #f3f5f5;
    overflow-wrap: anywhere;
    font-size: .875rem;
}
.pr-confirmation .slika img { display: block; max-width: 100%; height: auto; margin: 0 auto; }
.pr-confirmation .prazna-tema { grid-column: 1 / -1; margin: 0; color: #52666b; }
.pr-confirmation .footer { margin: 0; padding: 20px 0; border-color: #dce3e3; font-size: .875rem; text-align: center; }
.pr-confirmation .pr-confirmation-actions, .pr-confirmation .pr-confirmation-notice { padding-top: 0; }
.pr-confirmation .pr-confirmation-actions p { margin: 0; }
.pr-confirmation .pr-confirmation-actions a { display: inline-block; color: #fff; text-decoration: none; }
@media (max-width: 900px) {
    .pr-confirmation .maincopy { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
    .pr-confirmation .sectionbox { grid-template-columns: minmax(0, 1fr); gap: 16px; padding: 20px; }
    .pr-confirmation .naslov { text-align: left; }
    .pr-confirmation .maincopy { grid-template-columns: minmax(0, 1fr); }
}
