.greet-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;           /* hidden by default */
    align-items: center;
    justify-content: center;
}

.greet-modal.visible {
    display: flex;           /* shown when .visible is added */
}
.greet-modal .hidden {
display: none !important;
}

.hidden {
    display: none;           /* for #previewSection initial state */
}

.greet-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
}

.greet-modal-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.greet-modal-close {
    position: absolute;
    top: 8px;
    right: 8px;
    border: none;
    background: transparent;
    font-size: 1.4rem;
    cursor: pointer;
}

.greet-title {
    font-size: 1.6rem;
    margin: 0 0 0.5rem;
    color: #817554;
}

.greet-section {
    margin-bottom: 16px;
}


.greet-row {
display: flex;
justify-content: center;
align-items: center;
gap: 8px;
}


.greet-section h2 {
    font-size: 1.3rem;
    margin: 1.2rem 0 0.4rem;
    color: #4D2C60;
}

.greet-modal-content button {
    padding: 5px 10px;
    border-radius: 4px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-size: 16px;
}
button#uploadBtn {
    background: #d5f5eb;
}

.greet-modal-content button:disabled {
    opacity: 0.6;
    cursor: default;
}

.greet-modal-content .recording-btn {
width: 80px;
height: 80px;
border-radius: 50% !important; /* force circle */
padding: 0 !important;         /* padding would distort the circle */
font-size: 14px;
font-weight: 600;
display: flex;
align-items: center;
justify-content: center;
}



#previewVideo {
    max-width: 100%;
    width: 100%;
    background: #000;
    border-radius: 4px;
}

.greet-status {
    margin-top: 16px;
    font-size: 0.9rem;
    min-height: 1.2em;
    text-align: center;
}

.greet-status-error { color: #b00020; }
.greet-status-ok    { color: #006400; }

#videoInput {
    max-width: 100%;
}
#recordBtn {
border: 2px solid #08a070;
background-color: #d5f5eb;
}
/* Pulse animation */

@keyframes pulseRed {
0% {
box-shadow: 0 0 0 0 rgba(160, 8, 8, 0.8);
background-color: #f7e2e2;
}
50% {
box-shadow: 0 0 0 10px rgba(160, 8, 8, 0);
background-color: #fddcdc;
}
100% {
box-shadow: 0 0 0 0 rgba(160, 8, 8, 0);
background-color: #f7e2e2;
}
}

.recording-title {
color: #a00808;               /* red */
animation: blinkTitle 1s infinite;
}

#stopBtn {
border: 2px solid #a00808;
background-color: #f7e2e2;
animation: pulseRed 1.5s infinite;
}
#deleteGreetingBtn {
    border: 2px solid #a00808;
    background-color: #f7e2e2;
}

/* grey, no pulse when disabled */
#stopBtn:disabled {
border: 2px solid #333;
background-color: #d7d6d6;
box-shadow: none;
animation: none;
}
#openGreetingModalBtn {
    background-color: #4d2c60;
    color: #fff;
    padding: 5px 10px;
    border-radius: 15px;
    transition: background .55s ease-out;
}
#reviewGreetingBtn{
    background-color: #8c54aa;
    color: #fff;
    font-size: 14px;
    padding: 3px 10px;
    border-radius: 15px;
    border: 1px solid rgb(230, 178, 236);
    transition: background .55s ease-out;
}
.greet-banner {
margin-top: 10px;
padding: 8px 12px;
background: #e7f5e9;
border: 1px solid #4caf50;
color: #2e7d32;
border-radius: 4px;
font-size: 0.95rem;
display: flex;
align-items: center;
gap: 10px;
}

.greet-banner.hidden {
display: none;
}

.greet-record-banner {
    margin-top: 10px;
    padding: 12px 16px;
    background: #f7ecec;
    border: 1px solid #a00808;
    color: #7a1f1f;
    border-radius: 4px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 56px;
}

.greet-record-banner.hidden {
    display: none;
}

@media (max-width: 600px) {
    .greet-record-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }
}