.form {
    padding: 50px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    font-family: "Lato-regular", sans-serif;
    font-size: 16px;
}

label {
    box-sizing: border-box;
    display: block;
    padding: 0 0 8px 20px;
}

#name {
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 10px 20px;
    font-size: 16px;
    border: 2px solid var(--grey);
    border-radius: 10px;
}

.select-input {
    width: 100%;
    display: flex;
    gap: 10%;
}

.select-input .form-group {
    width: 100%;
}

@media (max-width: 1023px) {
    .form {
        padding: 24px 0 0 0;
    }

    .select-input {
        flex-direction: column;
        gap: 32px;
    }
}

.contact-person {
    font-weight: bold;
    color: var(--black);
}

#email {
    box-sizing: border-box;
    width: 100%;
    height: 50px;
    padding: 10px 20px;
    font-family: "Lato-regular", sans-serif;
    font-size: 16px;
    border: 2px solid var(--grey);
    border-radius: 10px;
}

.dropdown {
    box-sizing: border-box;
    border: 2px solid var(--grey);
    border-radius: 10px;
    padding: 10px 20px;
    cursor: pointer;
    height: 50px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.dropdown-selected {
    display: flex;
    width: 100%;
    justify-content: space-between;
}

.selected-text {
    display: flex;
    align-items: center;
}

.dropdown-arrow {
    margin-left: 10px;
    transition: all 0.3s ease;
    font-size: 24px;
}

.dropdown.open {
    border: 2px solid var(--black);
}

/* Обертаємо стрілку при відкритті */
.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
    color: var(--red);
}

.dropdown-options {
    list-style: none;
    margin: 0;
    padding: 16px;
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    border: 2px solid var(--grey);
    border-radius: 10px;
    max-height: 0;
    overflow: hidden;
    background: var(--white);
    transition: max-height 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
    z-index: 10;
    visibility: hidden;
    opacity: 0;
}

.dropdown.open .dropdown-options {
    max-height: 300px;
    /* box-shadow: 0 8px 12px rgba(0, 0, 0, 0.1); */
    box-shadow: var(--shadow-middle);
    visibility: visible;
    opacity: 1;
}

.dropdown-options li {
    padding: 12px 16px;
    cursor: pointer;
    color: var(--black-mid-tone);
    transition: backgound 0.2s ease;
}

.dropdown-options li:hover {
    background: var(--grey-gradient);
    color: var(--red);
    border-radius: 10px;
}

textarea {
    box-sizing: border-box;
    display: block;
    width: 100%;
    height: 150px;
    padding: 10px 20px;
    font-size: 16px;
    font-family: "Lato-regular", sans-serif;
    border: 2px solid var(--grey);
    border-radius: 10px;
    overflow: hidden;
    resize: vertical;
    word-wrap: break-word;
    word-break: break-word;
    white-space: pre-wrap;
}

.contacts-container {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 32px;
    padding-top: 32px;
}

.contacts-block {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 20px;
    gap: 10px;
    background: var(--grey-gradient);
    border-radius: 10px;
    width: 23%;
    box-shadow: var(--shadow-base);

    h5 {
        min-height: 40px;
        font-size: 24px;
        font-weight: bolder;
        margin: 0px;
    }

    .email {
        max-width: 100%;
        overflow-wrap: anywhere;
    }

    p {
        text-align: left;
    }
}

.contacts-block a:hover {
    color: var(--red);
}

@media (max-width: 1200px) {
    .contacts-block {
        width: 30%;

        h5 {
            min-height: 0px;
            font-size: 20px;
        }

        /* .address {
            min-height: 50.4px;
        }

        .email {
            min-height: 44.8px;
        } */
    }
}

@media (max-width: 798px) {
    .contacts-block {
        width: 45%;

        h5 {
            min-height: 54.4px;
        }

        .address {
            min-height: 0px;
        }

        .email {
            min-height: 0px;
        }
    }
}

@media (max-width: 600px) {
    .contacts-block {
        width: 100%;

        h5 {
            min-height: 0px;
        }

        .address {
            min-height: 0px;
        }

        .email {
            min-height: 0px;
        }
    }


}

/* Copyable item container */
.copyable-item {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 4px;
}

/* Text styling */
.copyable-text {
    margin: 0;
    line-height: 1.4;
    color: var(--black);
    transition: color 0.2s ease;
    text-decoration: none;
    display: inline-block;
    min-width: 0;
    width: fit-content;
    text-decoration: underline;
}

/* Email link specific styling */
.copyable-text.email {
    color: var(--black);
    word-break: break-all;
    word-break: normal;
}

/* SVG icon styling */
.copy-icon {
    margin-left: 6px;
    cursor: pointer;
    color: var(--black);
    opacity: 0;
    transition: all 0.2s ease;
    flex-shrink: 0;
    user-select: none;
}

/* Hover effects */
.copyable-item:hover .copyable-text {
    color: var(--red);
}

.copyable-item:hover .copy-icon {
    opacity: 1;
    color: var(--red);
}

/* Active state */
.copyable-item:active .copyable-text,
.copyable-item:active .copy-icon {
    color: var(--red-dark, #c41e3a);
    transform: scale(0.98);
}

/* Success animation */
.copyable-item.copied .copyable-text,
.copyable-item.copied .copy-icon {
    color: #4CAF50;
}

.copyable-item.copied .copy-icon {
    animation: pulse 0.6s ease;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* Mobile responsive */
@media (max-width: 768px) {
    .copy-icon {
        opacity: 0.3;
    }

    .copyable-item:hover .copy-icon,
    .copyable-item:active .copy-icon {
        opacity: 1;
    }

    .copyable-item {
        font-size: 12px;
    }
}

/* Ensure no gaps and perfect alignment */
.copyable-item * {
    vertical-align: middle;
}