/* ====== VARIABLES ====== */
:root {
    --color-primary: #57486d;
    --color-accent: rgb(255, 200, 154);
    --color-bg: #fafbff;
    --color-text: #251e2e;
    --color-error: #e85050;
    --color-error-bg: #fff5f5;
    --color-error-border: #ffd3da;
    --color-header-bg: #fff;
    --color-footer-bg: #57486d;
    --color-footer-bottom: rgb(255, 200, 154);
}


html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 88px;
}


.main-header {
    width: 100vw;
    background: var(--color-header-bg);
    box-shadow: 0 2px 8px rgba(87, 72, 109, 0.09);
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 42px;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 1001;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.main-logo {
    height: 36px;
    width: auto;
    display: block;
}

/* ====== CONTAINER (CARD) ====== */
.container {
    margin: 0 auto 0 auto;
    margin-top: 26px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 36px 0 rgba(87, 72, 109, 0.07);
    padding: 44px 36px 40px 36px;
    max-width: 430px;
    width: 100%;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

h1,
h2 {
    color: var(--color-primary);
    text-align: center;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 26px;
    margin-top: 0;
    letter-spacing: 0.01em;
}

h2 {
    font-size: 1.18rem;
    margin-bottom: 14px;
}

/* ====== FORM SECTIONS ====== */
.form-section,
#service-data-info {
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1.5px 8px rgba(87, 72, 109, 0.05);
    border: none;
    padding: 12px 0 8px 0;
    margin-bottom: 17px;
}

.form-group {
    margin-bottom: 21px;
}

/* ====== INPUTS ====== */
input[type="text"],
input[type="number"],
select {
    border: 1.5px solid #e3e5e9;
    background: #fcfcfc;
    border-radius: 7px;
    font-size: 1.11rem;
    padding: 13px 16px;
    margin-bottom: 4px;
    box-sizing: border-box;
    outline: none;
    width: 100%;
    color: var(--color-text);
    transition: border 0.14s;
}

input[type="text"]:focus,
input[type="number"]:focus,
select:focus {
    border-color: var(--color-primary);
    background: #f3f1fd;
}

label {
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 7px;
    display: block;
}

small {
    color: #787878;
    font-size: 0.86em;
    margin-top: 3px;
    display: block;
}

/* ====== BUTTONS ====== */
button,
#pay-btn {
    background: var(--color-primary);
    color: #fff;
    font-weight: 700;
    border-radius: 25px;
    border: none;
    padding: 17px 0;
    font-size: 1.11rem;
    margin-top: 15px;
    width: 100%;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 12px rgba(87, 72, 109, 0.06);
    transition: background 0.18s;
    text-transform: uppercase;
}

button:hover:not(:disabled),
#pay-btn:hover:not(:disabled) {
    background: #6a5a85;
}

button:disabled,
#pay-btn:disabled {
    background: #eee5f9;
    color: #b6b1c6;
    cursor: not-allowed;
}

/* ====== LINKS ====== */
a,
.small-link,
.form-link {
    color: var(--color-primary);
    text-decoration: underline;
    font-size: 0.96em;
}

a:hover {
    color: var(--color-accent);
    text-decoration: underline;
}

/* ====== ERROR ====== */
.error-message {
    color: var(--color-error);
    background: var(--color-error-bg);
    border: 1.5px solid var(--color-error-border);
    font-size: 1.03em;
    text-align: center;
    margin-top: 12px;
}

/* ====== FOOTER ====== */
.site-footer {
    background: var(--color-footer-bg);
    color: #fff;
    padding: 35px 0 25px 0;
    width: 100vw;
    margin: 0;
    flex-shrink: 0;
}

.footer-inner {
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 24px;
    font-size: 1.08em;
}

.footer-block {
    min-width: 230px;
    flex: 1;
}

.footer-block h4 {
    color: var(--color-accent);
    font-weight: 700;
    font-size: 1.06em;
    margin: 0 0 12px 0;
    letter-spacing: 0.01em;
}

.footer-block strong {
    color: var(--color-accent);
    font-weight: 600;
}

.footer-block a {
    color: #fff;
    text-decoration: underline;
    font-size: 1em;
}

.footer-block a:hover {
    color: var(--color-accent);
}

.footer-contacts {
    color: #fff;
    margin-top: 12px;
    font-size: 1.01em;
}

.footer-bottom {
    margin-top: 28px;
    text-align: center;
    color: var(--color-footer-bottom);
    font-size: 0.97em;
}

/* Фіксуємо футер знизу */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1 0 auto;
}

.site-footer {
    flex-shrink: 0;
}

@media (max-width: 900px) {
    .footer-inner {
        flex-direction: column;
        gap: 13px;
    }

    .footer-block {
        min-width: unset;
    }
}

/* ====== VERSION ====== */
.version-info {
    font-size: 0.83em;
    color: #b3b3b3;
    background: none;
    position: fixed;
    bottom: 10px;
    right: 12px;
    z-index: 1050;
}

/* ====== MODALS ====== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 500px;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-content h2 {
    text-align: center;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.modal-info-section {
    margin-bottom: 20px;
    padding: 10px;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.modal-info-section p {
    margin: 5px 0;
    font-size: 0.95rem;
    color: var(--color-text);
}

.modal-info-section p strong {
    display: inline-block;
    min-width: 120px;
    color: var(--color-primary);
}

.modal-question {
    text-align: center;
    margin-top: 25px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--color-primary);
}

.modal-buttons {
    display: flex;
    justify-content: space-around;
    gap: 15px;
}

.modal-buttons button {
    flex-grow: 1;
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 5px;
    background: var(--color-primary);
}

.modal-buttons button.confirm-btn {
    background-color: #2ecc40;
}

.modal-buttons button.confirm-btn:hover {
    background-color: #229c30;
}

.modal-buttons button.cancel-btn {
    background-color: #ff4136;
}

.modal-buttons button.cancel-btn:hover {
    background-color: #c90000;
}

/* ====== SPINNER ====== */
.spinner {
    border: 5px solid #eee5f9;
    border-top: 5px solid var(--color-primary);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 18px auto;
    display: block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* ====== ADAPTIVE ====== */
@media (max-width: 600px) {
    .main-header {
        padding: 0 8px;
    }

    .main-logo {
        height: 29px;
    }

    .container {
        padding: 18px 2vw;
    }

    .form-section,
    #service-data-info {
        padding: 13px 5px;
    }
}

.hidden-field,
.hidden {
    display: none !important;
}

button,
#get-receipt-again-btn,
.back-btn {
    background: #57486d;
    color: #fff;
    font-weight: 700;
    border-radius: 25px;
    border: none;
    padding: 17px 0;
    font-size: 1.11rem;
    width: 100%;
    letter-spacing: 0.03em;
    box-shadow: 0 2px 12px rgba(87, 72, 109, 0.06);
    margin-top: 15px;
    text-transform: uppercase;
    transition: background 0.18s;
    cursor: pointer;
}

button:hover:not(:disabled),
#get-receipt-again-btn:hover:not(:disabled),
.back-btn:hover {
    background: #6a5a85;
}
.form-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.875rem;
    color: #6c757d;
}