/* site.public.css (framed public layout, updated)
   - Frame width 90% with max-width 1600px (like legacy)
   - Equal margin on large screens
   - Fullscreen on mobile (no margins, no border radius)
*/

:root{
    --tds-black:#2a323f;
    --tds-yellow:#ffd500;

    --frame-bg: #fff;
    --frame-radius: .5em;
    --frame-border: #33343A;
    --frame-shadow: 0 0 8px 1px #b3b3b3 !important;

    --frame-margin: 32px;
}

html, body { height: 100%; }
body{
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
    background-image: radial-gradient(#2a323f 5%, transparent 5%), radial-gradient(#ffd500 5%, transparent 5%);
    background-color: #ffffff;
    background-position: 0 0, 15px 15px;
    background-size: 30px 30px;
    overflow: auto;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    box-sizing: border-box;
}
.btn-consio-submit {
    color: #ffffff;
    background-color: #1BBD66;
    border-color: #130269;
}

    .btn-consio-submit.big {
        font-weight: 500;
        font-size: 1.3em;
    }

    .btn-consio-submit:hover,
    .btn-consio-submit:focus,
    .btn-consio-submit:active,
    .btn-consio-submit.active,
    .open .dropdown-toggle.btn-consio-submit,
    .sidebarFilter .btn:focus,
    .sidebarFilter .btn:hover {
        color: #ffd500;
        background-color: #2a323f;
        border-color: #130269;
    }

    .btn-consio-submit:active,
    .btn-consio-submit.active,
    .open .dropdown-toggle.btn-consio-submit {
        background-image: none;
    }

    .btn-consio-submit.disabled,
    .btn-consio-submit[disabled],
    fieldset[disabled] .btn-consio-submit,
    .btn-consio-submit.disabled:hover,
    .btn-consio-submit[disabled]:hover,
    fieldset[disabled] .btn-consio-submit:hover,
    .btn-consio-submit.disabled:focus,
    .btn-consio-submit[disabled]:focus,
    fieldset[disabled] .btn-consio-submit:focus,
    .btn-consio-submit.disabled:active,
    .btn-consio-submit[disabled]:active,
    fieldset[disabled] .btn-consio-submit:active,
    .btn-consio-submit.disabled.active,
    .btn-consio-submit[disabled].active,
    fieldset[disabled] .btn-consio-submit.active {
        background-color: #1BBD66;
        border-color: #130269;
    }

    .btn-consio-submit .badge {
        color: #1BBD66;
        background-color: #ffffff;
    }

/* Optional photo background */
.bg-photo{
    background-image: var(--public-bg), radial-gradient(#2a323f 5%, transparent 5%), radial-gradient(#ffd500 5%, transparent 5%) !important;
    background-size: cover, 30px 30px, 30px 30px;
    background-position: center, 0 0, 15px 15px;
    background-repeat: no-repeat, repeat, repeat;
}

#_bodyWrapper.bodyWrapper { min-height: 100%; width: 100%; }
#appBox {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: var(--frame-margin);
    box-sizing: border-box;
}

/* Frame */
.app-frame{
    width: 90%;
    max-width: 1600px;
    margin: auto;
    background: var(--frame-bg);
    border: 1px solid var(--frame-border);
    border-radius: var(--frame-radius);
    box-shadow: var(--frame-shadow);
    overflow: auto;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 2*var(--frame-margin));
    min-height: 0;
}

/* Inner padding */
.frame-inner{ padding-left: 24px; padding-right: 24px; }

/* Header */
.public-header{
    background: #ffffff;
    border-bottom: 1px solid rgba(0,0,0,.06);
}
.public-header .navbar-brand{ letter-spacing:.2px; }
#clientLogo{
    height: 52px;
    padding-top: 8px;
    padding-bottom: 4px;
    transform: translateX(5px);
}

/* Structure */
.structure{ flex: 1 1 auto; width: 100%; margin: 0; padding: 0; overflow: auto; min-height: 0; }
#contentLeft.contentLeft, .contentLeft, #contentLeft{
    position: relative;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    overflow: visible;
    white-space: normal;
}

/* Hide sidebar */
#sidebarMenu, .sidebar, #rightbar, .contentRight { display: none !important; width: 0 !important; }

/* Footer */
.public-footer{
    background: #2b2b2b;
    color: #ffffff;
    border-top: 4px solid var(--tds-yellow);
    padding-top: 10px;
    padding-bottom: 10px;
}

.public-footer .public-footer-row{
    gap: 12px;
}

.public-footer .public-footer-logo{
    display: block;
    float: none !important;
    margin-top: 0 !important;
    max-height: 24px !important;
    transform: translateX(5px);
    padding-bottom: 4px;
}

.public-footer .public-footer-right-custom + .public-footer-logo{
    display: none;
}

.public-footer .Personvernerklæring a,
.public-footer .Personvernerklæring a:visited,
.public-footer .Personvernerklæring a:hover,
.public-footer .Personvernerklæring a:focus{
    color: #ffffff !important;
}

.public-footer.donation-detail-footer{
    background: #2b2b2b;
    color: #ffffff;
    border-top: 4px solid var(--tds-yellow);
    padding-top: 6px;
    padding-bottom: 6px;
}

.public-footer.donation-detail-footer .donation-footer-row{
    min-height: 36px;
}

.public-footer.donation-detail-footer .donation-footer-copy,
.public-footer.donation-detail-footer .donation-footer-logo-col{
    display: flex;
    align-items: center;
}

.public-footer.donation-detail-footer .donation-footer-logo-col{
    justify-content: flex-end;
}

.public-footer.donation-detail-footer .donation-footer-links-col{
    display: flex;
    justify-content: center;
    margin: 0.2rem 0;
}

.public-footer.donation-detail-footer .footer-legal-links{
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    line-height: 1.15;
    font-size: 0.95rem;
}

.public-footer.donation-detail-footer .footer-legal-item + .footer-legal-item{
    margin-top: 0.05rem;
}

.public-footer.donation-detail-footer .footer-legal-link,
.public-footer.donation-detail-footer .footer-legal-link:visited,
.public-footer.donation-detail-footer .footer-legal-link:hover,
.public-footer.donation-detail-footer .footer-legal-link:focus{
    color: #ffffff !important;
    text-decoration: none;
}

.public-footer.donation-detail-footer .footer-legal-link:hover,
.public-footer.donation-detail-footer .footer-legal-link:focus{
    text-decoration: underline;
}

.public-footer.donation-detail-footer .footer-legal-link.btn,
.public-footer.donation-detail-footer .footer-legal-link.btn:focus,
.public-footer.donation-detail-footer .footer-legal-link.btn:hover{
    padding: 0;
    border: 0;
    font-size: inherit;
    line-height: inherit;
    box-shadow: none;
}

.public-footer.donation-detail-footer .donation-footer-modal .modal-body{
    max-height: 60vh;
    overflow-y: auto;
}

.public-footer.donation-detail-footer .donation-footer-modal .modal-content,
.public-footer.donation-detail-footer .donation-footer-modal .modal-header,
.public-footer.donation-detail-footer .donation-footer-modal .modal-body,
.public-footer.donation-detail-footer .donation-footer-modal .modal-title,
.public-footer.donation-detail-footer .donation-footer-modal .close{
    color: #212529;
}

.public-footer.donation-detail-footer .donation-footer-modal .modal-content{
    background-color: #ffffff;
}

.public-footer.donation-detail-footer .text,
.public-footer.donation-detail-footer .text a{
    color: #ffffff;
}

.public-footer.donation-detail-footer .public-footer-logo{
    margin-top: 0 !important;
    max-height: 24px !important;
}

.btn.BlueBtn{
    background-color: #304454;
    border-color: #304454;
    color: #ffffff;
}

.btn.BlueBtn:hover,
.btn.BlueBtn:focus,
.btn.BlueBtn:active{
    background-color: #1f2d38;
    border-color: #1f2d38;
    color: #ffd500;
}

/* Responsive */
@media (max-width: 992px){
    .frame-inner{ padding-left: 16px; padding-right: 16px; }
    body{ padding: 16px; }
    #appBox{ padding: 16px; }
}
@media (max-width: 768px){
    body{ padding: 0; }
    #appBox{ padding: 0; }
    .app-frame{
        width: 100% !important;
        max-width: none;
        margin: 0;
        border-radius: 0;
        min-height: 100vh;
        max-height: none;
        overflow: visible;
    }
    .structure{
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .structure::-webkit-scrollbar{
        display: none;
    }

    .public-footer .public-footer-copy{
        display: none;
    }

    .public-footer .public-footer-row{
        justify-content: space-between !important;
        flex-wrap: nowrap;
        gap: 10px;
    }

    .public-footer .Personvernerklæring{
        padding-left: 0 !important;
        margin-right: auto;
    }

    .public-footer .Personvernerklæring a{
        font-size: 0.9rem;
        white-space: nowrap;
    }

    .public-footer .public-footer-right{
        opacity: 1 !important;
    }

    .public-footer .public-footer-right-custom{
        display: none !important;
    }

    .public-footer .public-footer-logo{
        display: block !important;
        height: 18px !important;
        max-height: 18px !important;
        width: auto;
    }

    .public-footer.donation-detail-footer .donation-footer-copy,
    .public-footer.donation-detail-footer .donation-footer-links-col,
    .public-footer.donation-detail-footer .donation-footer-logo-col{
        justify-content: center;
        text-align: center;
    }

    .public-footer.donation-detail-footer .donation-footer-logo-col{
        margin-top: 0.5rem;
    }
}

main img, main iframe{ max-width: 100%; height: auto; }

.app-frame {
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100dvh;
}

.structure {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

/* Vipps donation button styling */
.btn-vipps {
    background-color: #ff5b24;
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    column-gap: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: none;
    border-radius: 999px;
    padding: 0.65rem 1.8rem;
    box-shadow: 0 10px 20px rgba(255, 91, 36, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-vipps .vipps-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.1);
    color: #fff !important;
}

.btn-vipps .vipps-wordmark {
    display: block;
    width: 64px;
    max-width: 100%;
    height: auto;
}

.btn-vipps .vipps-wordmark text {
    letter-spacing: 0.08em;
}

.btn-vipps .vipps-cta {
    font-weight: 600;
    font-size: 1.05rem;
}

.btn-vipps:hover,
.btn-vipps:focus {
    background-color: #e24c16;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(226, 76, 22, 0.35);
}

.btn-vipps:active {
    background-color: #c74212;
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(199, 66, 18, 0.35);
}

.btn-vipps:focus-visible {
    outline: 3px solid rgba(255, 91, 36, 0.6);
    outline-offset: 2px;
}

.btn-donation-secondary {
    background-color: #1bbd66;
    border: none;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.65rem 1.8rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 20px rgba(27, 189, 102, 0.25);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn-donation-secondary:hover,
.btn-donation-secondary:focus {
    background-color: #159f55;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(21, 159, 85, 0.3);
}

.btn-donation-secondary:active {
    background-color: #0f8244;
    transform: translateY(0);
    box-shadow: 0 6px 16px rgba(15, 130, 68, 0.3);
}

.btn-donation-secondary:focus-visible {
    outline: 3px solid rgba(27, 189, 102, 0.45);
    outline-offset: 2px;
}
