﻿html, body {
    margin: 0;
    padding: 0;
    background: #efefef;
    color: #212529;
    font-family: Arial, Helvetica, sans-serif;
}

/* ===== Environment banner ===== */

.ap-env-banner {
    text-align: center;
    font-weight: 700;
    letter-spacing: .4px;
    padding: 8px 12px;
    color: #fff;
}

.ap-env-banner-test {
    background-color: #b00020;
}

.ap-env-banner-local {
    background-color: #198754;
}

/* ===== Top bar / header ===== */
.ap-topbar {
    background: #0b88bf;
    border-bottom: 1px solid #086b96;
    margin-bottom: 14px;
}

.ap-topbar-inner {
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
}

.ap-topbar-link,
.ap-topbar-link:visited {
    color: #fff;
    text-decoration: none;
    font-size: 15px;
    line-height: 1;
}

    .ap-topbar-link:hover {
        color: #fff;
        text-decoration: underline;
    }

.ap-topbar-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.ap-brand-wrap {
    max-width: 1220px;
    margin: 0 auto;
    padding: 0 12px;
}

    .ap-brand-wrap.container,
    .ap-main.container,
    .container.ap-brand-wrap,
    .container.ap-main {
        max-width: 1220px !important;
    }

.ap-brand-link {
    color: #000;
    text-decoration: none;
    display: block;
}

    .ap-brand-link:hover {
        color: #000;
        text-decoration: none;
    }

.ap-brand-row {
    flex-wrap: nowrap;
}

.ap-brand-seal {
    padding-right: 18px;
}

    .ap-brand-seal img {
        max-height: 90px;
        width: auto;
        display: block;
    }

.ap-brand-text h1 {
    font-size: 28px;
    line-height: 1.15;
    font-weight: 400;
    margin: 0;
}

.ap-brand-text h2 {
    font-size: 40px;
    line-height: 1.1;
    font-weight: 400;
    margin: 4px 0 0 0;
}


/* ===== Main content shell ===== */
.ap-main {
    max-width: 1220px;
    margin: 0 auto 32px auto;
    padding: 0 12px;
}

.ap-request-wrapper {
    max-width: 1220px;
    margin: 0 auto;
    background: #f5f5f5;
    padding: 20px 24px;
}

.ap-accent-bar {
    height: 40px;
    background: linear-gradient(#1b4f90, #123b70);
    margin: 0 0 18px 0;
}

/* ===== Footer ===== */

.ap-footer a {
    text-decoration: none;
}

    .ap-footer a:hover {
        text-decoration: underline;
    }

.ap-build-info {
    font-size: 12px;
    color: #666;
}

/* ===== Shared form / control rules ===== */

button.btn,
input[type="submit"].btn,
input[type="button"].btn,
.btn {
    min-height: 30px;
}

select,
textarea,
input[type="text"],
input[type="password"],
input[type="datetime"],
input[type="datetime-local"],
input[type="date"],
input[type="month"],
input[type="time"],
input[type="week"],
input[type="number"],
input[type="email"],
input[type="url"],
input[type="search"],
input[type="tel"],
input[type="color"],
.uneditable-input {
    margin-bottom: 0;
    box-sizing: border-box;
}

.alert p,
.alert h5 {
    color: #000;
}

table {
    max-width: 100%;
}

input[type="file"]::file-selector-button {
    border-radius: 4px;
    padding: 0 14px;
    height: 30px;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.16);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
    margin-right: 16px;
    transition: background-color 200ms;
}

    input[type="file"]::file-selector-button:hover {
        background-color: #f3f4f6;
    }

    input[type="file"]::file-selector-button:active {
        background-color: #e5e7eb;
    }

/* ===== Apostille page styles ===== */

h2, h3, h4 {
    color: #000;
}

.error {
    color: #aa0000;
}

.highlight {
    background-color: yellow;
    font-weight: bold;
    border: 1px solid #333;
    padding: 3px 10px;
}

.cb label {
    display: inline-block;
    vertical-align: top;
}

.ap-warning {
    color: #c40000;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 14px 0;
}

.ap-warning-copy,
.ap-request-warning,
.ap-top-warning {
    color: #c40000;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    overflow: visible;
    word-break: normal;
    margin: 0 0 14px 0;
}

.ap-instruction-link {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 600;
    text-align: center;
    margin: 8px 0 18px 0;
}

.ap-page-title {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 18px 0;
    color: #000;
}

.ap-section-title {
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 18px 0;
    color: #000;
}
/* ===== Upper requestor section ===== */

.ap-form-row {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.ap-form-label {
    width: 235px;
}

.ap-form-field {
    flex: 1;
}

.ap-name-fields {
    display: flex;
    gap: 6px;
    flex-wrap: nowrap;
}

.ap-input,
.ap-form-field input[type="text"],
.ap-form-field input[type="email"] {
    height: 30px;
    padding: 4px 8px;
}

.ap-input-first {
    width: 210px;
}

.ap-input-middle {
    width: 120px;
}

.ap-input-last {
    width: 210px;
}

.ap-input-medium {
    width: 240px;
}

/* ===== Lower request section ===== */

.ap-request-lower {
    margin-top: 10px;
    max-width: none;
}

.ap-request-copy {
    margin: 0 0 10px 0;
    line-height: 1.45;
}

.ap-email-block {
    margin: 10px 0 12px 0;
}

.ap-email-help {
    margin: 0 0 6px 0;
    line-height: 1.25;
    white-space: normal;
}

.ap-email-input-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ap-radio-list {
    margin: 6px 0 12px 0;
}

.ap-radio-row {
    display: block;
    margin: 0 0 4px 0;
}

.ap-radio-list .cb {
    display: inline-block;
    margin: 0;
}

.ap-upload-copy {
    margin: 10px 0 8px 0;
}

.ap-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0 0 8px 0;
}

.ap-uploaded-block {
    margin: 0 0 10px 0;
    min-height: 70px;
}

.ap-country-copy {
    display: inline-block;
}

.ap-input-country {
    width: 190px;
    height: 30px;
    padding: 4px 8px;
    box-sizing: border-box;
}

.ap-continue-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 10px 0 0 0;
}

.ap-continue-copy {
    display: inline-block;
    margin: 0;
}

.ap-inline-error {
    display: block;
    color: #cc0000;
    font-weight: normal;
    margin: 0 0 6px 0;
}

.ap-country-error {
    display: inline-block;
    margin: 0 6px 0 0;
}

.ap-upload-message {
    margin: 0 0 8px 0;
}

.ap-upload-success {
    color: green;
}

.ap-preview-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin: 0 0 6px 0;
}

.ap-preview-copy {
    color: #212529;
}

.ap-upload-instruction {
    margin: 0;
    color: #212529;
}

.ap-country-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin: 0 0 10px 0;
}

/* ===== Receipt links ===== */

.ap-link-button {
    display: inline-block;
    padding: 6px 12px;
    margin: 6px 8px 0 0;
    background-color: yellow;
    border: 1px solid #333;
    color: #000;
    text-decoration: none;
    font-weight: bold;
}

    .ap-link-button:hover {
        text-decoration: none;
        color: #000;
    }

/* ===== Verification page ===== */

.auto-style {
    height: 36px;
    margin-left: 5px;
}

/* ===== Payment page ===== */

.ap-payment-copy {
    margin: 0 0 18px 0;
    line-height: 1.45;
}

.ap-payment-heading {
    font-size: 22px;
    line-height: 1.2;
    font-weight: 400;
    margin: 0 0 14px 0;
    color: #000;
}

.ap-payment-form {
    margin: 0 0 14px 0;
    max-width: 900px;
}

.ap-payment-input-short {
    width: 200px;
    height: 30px;
    padding: 4px 8px;
    box-sizing: border-box;
}

.ap-payment-button-row {
    margin: 0 0 18px 0;
}

.ap-payment-note {
    margin: 4px 0 12px 0;
    line-height: 1.45;
}

/* ===== CC Payment ===== */

.payment-container {
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    font-family: 'Segoe UI', sans-serif;
    max-width: 900px;
    margin: auto;
    padding: 1rem;
    border: 1px solid #ccc;
    border-radius: 10px;
    background-color: #f9f9f9;
}

.form-section {
    flex: 1 1 300px;
    min-width: 300px;
}

    .form-section h4 {
        margin-bottom: 1rem;
        border-bottom: 1px solid #ddd;
        padding-bottom: 0.5rem;
        color: #333;
    }

.form-group {
    margin-bottom: 1rem;
}

    .form-group label {
        display: block;
        font-weight: 600;
        margin-bottom: 0.3rem;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        width: 100%;
        padding: 0.5rem;
        border: 1px solid #ccc;
        border-radius: 5px;
    }

    .form-group .validator {
        display: block;
        font-size: 0.85em;
        color: red;
        margin-top: 0.25rem;
    }

.submit-row {
    width: 100%;
    text-align: center;
    margin-top: 1.5rem;
}

    .submit-row input[type="submit"],
    .submit-row button {
        padding: 0.6rem 1.5rem;
        font-size: 1rem;
        background-color: #0078D7;
        color: white;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

        .submit-row input[type="submit"]:hover {
            background-color: #005fa3;
        }

        .submit-row input[type="submit"]:disabled,
        .submit-row button:disabled {
            background-color: #cccccc !important;
            color: #666666 !important;
            cursor: not-allowed !important;
            opacity: 0.7;
        }

            /* Remove hover effect when disabled */
            .submit-row input[type="submit"]:disabled:hover,
            .submit-row button:disabled:hover {
                background-color: #cccccc !important;
            }

    .pay-error {
        width: 100%;
        margin-top: 10px;
        padding: 10px 12px;
        border: 1px solid #d93025;
        background: #fde8e6;
        border-radius: 6px;
        color: #8a1f17;
        font-weight: 600;
    }
/* ===== Responsive ===== */

@media (max-width: 767.98px) {
    .ap-brand-row {
        flex-wrap: wrap;
    }

    .ap-brand-seal {
        padding-right: 0;
        margin-bottom: 10px;
    }

    .ap-brand-text h1 {
        font-size: 24px;
    }

    .ap-brand-text h2 {
        font-size: 30px;
    }

    .ap-form-row {
        display: block;
    }

    .ap-form-label {
        width: auto;
        flex: none;
        margin-bottom: 4px;
    }

    .ap-name-fields {
        flex-wrap: wrap;
    }

    .ap-input-first,
    .ap-input-middle,
    .ap-input-last,
    .ap-input-medium,
    .ap-input-country {
        width: 100%;
        max-width: 100%;
    }
}
