body {
    margin: 0;
    padding: 0;
    background-color: #3e513c;
    /* Changed to match image tone to prevent white lines */
}

.main-container {
    max-width: 480px;
    /* Limit width for mobile view optimization as per SVG size */
    margin: 0 auto;
    background-color: #3e513c;
    /* Match image tone */
    display: flex;
    flex-direction: column;
    line-height: 0;
    /* Removes potential whitespace */
    font-size: 0;
    /* Ensures no text spacing */
}

.img-block {
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
    /* Ensures no margins */
    pointer-events: none;
    /* Disables interaction: click, drag, context menu */
    user-select: none;
    /* Prevents selection */
    clip-path: inset(5px 0);
    /* Crop 5px from top and bottom to remove artifacts */
}

.overlay-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: 15;
}

.overlay-image.visible {
    opacity: 1;
}

.map-wrapper,
.form-wrapper {
    position: relative;
    width: 100%;
    line-height: 0;
}

.yandex-map {
    position: absolute;
    top: 82.77%;
    left: 50.67%;
    transform: translate(-50%, -50%);
    width: 77.74%;
    height: 24.01%;
    z-index: 10;
    clip-path: inset(0 0 5.77% 0);
}

/* Fix white lines between images by slightly overlapping them */
.img-block+.img-block,
.img-block+.map-wrapper,
.map-wrapper+.img-block,
.img-block+.form-wrapper,
.form-wrapper+.img-block {
    margin-top: -11px;
    /* -10px to cover the cropped gaps + 1px overlap */
}

/* Crop the 4th image by 200px from the bottom */
.crop-bottom-200 {
    /* Hides the bottom 200px and top 5px */
    clip-path: inset(5px 0 200px 0);
    /* Removes the empty space left by the cropped area */
    margin-bottom: -200px;
}

/* Form Styles */
.rsvp-form {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 20;
    display: block;
}

/* Individual field positioning */
.rsvp-input,
.custom-select-wrapper {
    position: absolute;
    left: 44.67%;
    /* Adjusted for -20px offset from center (167.5/375) */
    transform: translateX(-50%);
    width: 61.33%;
    /* 230px / 375px */
    height: 4.31%;
    /* 28px / 649px */
    margin: 0;
    box-sizing: border-box;
    font-family: 'Times New Roman', Times, serif;
}

.input-name {
    top: 35.2%; /* Moved down by ~0.3% (2px) from 34.9% */
    border: none !important;
}

.input-phone {
    top: 46.7%; /* Moved down by ~0.3% */
    border: none !important;
}

.input-response {
    top: 59.2%; /* Moved up by ~0.3% (2px) from 59.5% */
}

.input-guests {
    top: 75.6%; /* Moved down by ~3.1% */
    border: none !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease-in-out;
    z-index: 25;
}

.input-guests.visible {
    opacity: 1;
    pointer-events: auto;
}

.input-response .custom-select__trigger {
    border: none !important;
    /* Removes border from the dropdown trigger */
    color: rgba(243, 218, 184, 0.7);
    /* Placeholder color style */
}

.input-response.selected .custom-select__trigger {
    color: #f3dab8;
    /* Active text color when selected */
}

.rsvp-input {
    background: transparent;
    border: 1px solid #f3dab8;
    color: #f3dab8;
    padding: 0 10px;
    font-size: 14px;
    outline: none;
    transition: background-color 0.3s;
}

.rsvp-input::placeholder {
    color: rgba(243, 218, 184, 0.7);
}

.rsvp-input:focus {
    background-color: rgba(62, 81, 60, 0.8);
    /* Semi-transparent background effect */
}

/* Custom Select */
.custom-select-wrapper {
    /* Position defined above */
    user-select: none;
}

.custom-select {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.custom-select__trigger {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 10px;
    font-size: 14px;
    color: #f3dab8;
    height: 100%;
    background: transparent;
    border: 1px solid #f3dab8;
    cursor: pointer;
    transition: background-color 0.3s;
}

.submit-btn {
    position: absolute;
    bottom: 4.62%;
    /* 30px */
    left: 48.67%;
    /* 50% - 5px offset */
    transform: translateX(-50%);
    width: 80.8%;
    /* 303px */
    height: 4.93%;
    /* 32px */
    background: transparent;
    border: none;
    outline: none;
    cursor: pointer;
    z-index: 30;
    -webkit-tap-highlight-color: transparent;
}

.submit-btn:active,
.submit-btn:focus {
    background: transparent;
    outline: none;
}

.custom-select.open .custom-select__trigger {
    background-color: rgba(62, 81, 60, 0.8);
}

.custom-select__options {
    position: absolute;
    display: block;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #f3dab8;
    border-top: 0;
    background: #3e513c;
    transition: all 0.3s;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 30;
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

.custom-option {
    position: relative;
    display: block;
    padding: 0 10px;
    font-size: 14px;
    font-weight: 300;
    color: #f3dab8;
    line-height: 28px;
    cursor: pointer;
    transition: all 0.3s;
}

.custom-option:hover {
    background-color: rgba(243, 218, 184, 0.1);
}

.custom-option.selected {
    background-color: rgba(243, 218, 184, 0.2);
}

.arrow {
    transition: transform 0.3s;
    transform-origin: center;
}

.custom-select.open .arrow {
    transform: rotate(180deg);
}

/* Notification Styles */
.notification {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.notification.visible {
    opacity: 1;
    visibility: visible;
}

.notification-content {
    background-color: #3e513c;
    border: 1px solid #f3dab8;
    padding: 30px 50px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.notification.visible .notification-content {
    transform: scale(1);
}

.notification-text {
    color: #f3dab8;
    font-family: 'Times New Roman', Times, serif;
    font-size: 24px;
    display: block;
}

/* Checkbox Styles */
.couple-checkbox-input {
    display: none;
}

.couple-checkbox-label {
    /* Styles for the checkbox label/svg container */
    display: block;
    width: 100%;
    height: 100%;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.couple-checkbox-label svg {
    opacity: 0;
    transition: opacity 0.3s;
}

.couple-checkbox-input:checked+.couple-checkbox-label svg {
    opacity: 1;
}

.input-couple {
    position: absolute;
    top: 68.0%; /* Moved down to fit between response and guests */
    left: 15.87%; /* ~60px from left (50% - 128px) */
    transform: translateX(-50%);
    width: 8%; /* 30px */
    height: 4.62%; /* 30px */
    z-index: 25;
    margin: 0;
}