.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;                 /* immer im DOM */
    justify-content: center;
    align-items: center;
    z-index: 1000;

    opacity: 0;
    pointer-events: none;         /* Klicks blockieren wenn unsichtbar */
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
    pointer-events: auto;         /* Klicks wieder erlauben */
}

.modal-content {
    background: #fff;
    max-width: 420px;
    width: 90%;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);

    transform: translateY(10px) scale(0.98);
    transition: transform 0.3s ease;
}

.modal.show .modal-content {
    transform: translateY(0) scale(1);
}

.modal-content.contact-modal {
    background: #fff;
    max-width: 420px;
    width: 90%;
    border-radius: 12px;
    padding: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,.3);
}

.modal-close {
    position: absolute;
    top: 10px;
    right: 14px;
    font-size: 24px;
    cursor: pointer;
}

#mailForm label {
    display: block;
    margin-top: 10px;
    font-weight: 600;
}

#mailForm input,
#mailForm textarea {
    width: 95%;
    padding: 8px 10px;
    margin-top: 4px;
    border-radius: 6px;
    border: 1px solid #ddd;
}

#mailForm button {
    margin-top: 14px;
    padding: 10px 16px;
    border: none;
    border-radius: 6px;
    background: #FFE4E1;
    cursor: pointer;
    font-weight: bold;
}

#mailSubmitBtn:disabled {
    background: #cfcfcf;   /* grau */
    color: #888;
    cursor: not-allowed;
    opacity: 0.7;
}

.mail-loader {
    margin-top: 10px;
    font-size: 14px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 6px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Optional: echtes Spinner-Icon statt Emoji */
.mail-loader::before {
    content: "⏳";
    display: inline-block;
    animation: spin 1.2s linear infinite;
}