@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600&family=Montserrat:wght@400;500;600;700;800&family=Share+Tech+Mono&display=swap');

body {
    overflow: hidden;
    background: transparent;
}

#passportId.passport-overlay * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Montserrat', 'Proxima Nova', sans-serif;
    user-select: none;
    text-transform: uppercase;
}

#passportId.passport-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.82);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    overflow-x: hidden;
    overflow-y: auto;
    pointer-events: none;
    cursor: default;
}

#passportId.passport-overlay.active {
    display: flex;
    pointer-events: auto;
    cursor: default;
}

#passportId.passport-overlay.active * {
    cursor: inherit;
}

#passportId .passport-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
    transform: scale(0.92);
    pointer-events: auto;
    padding: 20px 0 30px;
}

@media (min-width: 1600px) {
    #passportId .passport-container {
        transform: scale(1);
    }
}

#passportId .passport-header-external {
    width: 850px;
    max-width: 92vw;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #ffffff;
    padding: 0 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

#passportId .doc-close-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    opacity: 0.9;
}

#passportId .hint-text {
    font-weight: 500;
    font-size: 14px;
    text-transform: none;
}

#passportId .main-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 1px;
}

#passportId .icon-pass {
    width: 24px;
    height: 24px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.3));
}

#passportId .passport-card {
    position: relative;
    width: 850px;
    max-width: 92vw;
    min-height: 520px;
    background-color: #ffffff;
    border-radius: 32px;
    border: 10px solid #3a3a3a;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    padding: 30px 40px 25px 40px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.9);
}

@keyframes passportCardOpen {
    0% { opacity: 0; transform: scale(0.9); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes passportCardClose {
    0% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.9); }
}

#passportId .passport-card.anim-open {
    animation: passportCardOpen 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.15) forwards;
}

#passportId .passport-card.anim-close {
    animation: passportCardClose 0.2s ease-in forwards;
}

#passportId .watermark {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

#passportId .watermark.coat-of-arms {
    top: 54%;
    left: 40%;
    transform: translate(-50%, -50%);
    width: 260px;
    height: 260px;
    opacity: 0.07;
    background-image: url("img/coat_ua.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#passportId .watermark.map-ukraine {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 92%;
    height: 92%;
    opacity: 0.11;
    background-image: url("img/map_ua.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#passportId .card-head {
    position: relative;
    z-index: 2;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    border-bottom: 2px solid #e0e0e0;
    padding-bottom: 15px;
}

#passportId .flag-mini-left,
#passportId .flag-mini-right {
    width: 45px;
    height: 30px;
    border-radius: 4px;
    background: linear-gradient(to bottom, #005bbb 50%, #ffd500 50%);
    border: 1px solid rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

#passportId .title-center {
    text-align: center;
    color: #000000;
}

#passportId .title-center .line-1 {
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

#passportId .coat-mini {
    width: 20px;
    height: 28px;
    background-image: url("img/coat_ua.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#passportId .title-center .line-2,
#passportId .title-center .line-3 {
    font-weight: 600;
    font-size: 11px;
    color: #333333;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

#passportId .card-body {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 25px;
    flex: 1;
    margin-bottom: 0;
    min-height: 0;
}

#passportId .body-left {
    width: 170px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#passportId .photo-block {
    width: 165px;
    height: 215px;
    background-color: #f2f2f2;
    border: 4px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.1);
}

#passportId #passport_photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#passportId .photo-placeholder {
    display: none;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

#passportId .photo-placeholder svg {
    width: 64px;
    height: 64px;
}

#passportId .body-right-data {
    flex: 1;
    display: flex;
    gap: 8px;
    min-width: 0;
}

#passportId .data-col-left {
    flex: 1.2;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#passportId .data-col-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

#passportId .field-row {
    display: flex;
    gap: 16px;
}

#passportId .field-group {
    flex: 1;
}

#passportId .labels {
    font-size: 10px;
    font-weight: 600;
    color: #666666;
    text-transform: none;
    margin-bottom: 2px;
}

#passportId .value {
    font-size: 18px;
    font-weight: 700;
    color: #000000;
    letter-spacing: 0.5px;
    word-break: break-word;
}

#passportId .value.val-big {
    font-size: 22px;
    font-weight: 800;
    color: #3b66f5;
}

#passportId .value.val-sm {
    font-size: 14px;
}

#passportId .value.static {
    color: #555555;
}

#passportId .field-divider {
    width: 100%;
    height: 1px;
    background-color: #eeeeee;
    margin: 2px 0;
}

#passportId .signature-text {
    font-family: 'Caveat', cursive;
    font-size: 34px;
    color: #1a1a1a;
    transform: rotate(-4deg);
    text-transform: none;
    opacity: 0.85;
    line-height: 1;
    margin-top: 5px;
    margin-left: 10px;
}

#passportId .card-bottom-extra {
    position: relative;
    z-index: 2;
    width: 100%;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    padding-top: 20px;
}

#passportId .mrz-code {
    font-family: 'Share Tech Mono', 'Courier New', monospace;
    font-size: 16px;
    color: #000000;
    line-height: 1.3;
    letter-spacing: 16.3px;
    font-weight: 700;
    width: 100%;
    text-align: center;
    white-space: nowrap;
    margin-left: 8px;
    text-transform: none;
}

#passportId .card-foot {
    position: absolute;
    bottom: 6px;
    right: 20px;
    z-index: 2;
    font-size: 9px;
    color: #aaaaaa;
    text-transform: none;
    font-weight: 500;
    opacity: 0.5;
}
