/* Đảm bảo wrapper phủ toàn màn hình */
.modal-wrapper {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    visibility: hidden; opacity: 0;
    transition: all 0.3s ease;
}

.modal-wrapper.active { visibility: visible; opacity: 1; }

/* Lớp nền đen mờ */
.cdk-overlay-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 1;
}

/* Khung nội dung màu trắng */
.modal-content {
    background: white;
    padding: 10px;
    border-radius: 12px;
    position: relative;
    z-index: 2; /* Phải lớn hơn lớp nền */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    width: 400px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
}
.modal-wrapper.active .modal-content {
    transform: translateY(0);
}

/* Header mỏng và nút đóng bên trong */
.modal-header {
    padding: 10px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

/* Tạo một khoảng trống giả bên trái bằng kích thước nút đóng */
.modal-header::before {
    content: "";
    width: 24px; /* Phải bằng chiều rộng của nút .close-inner */
}

.modal-header p {
    font-weight: 600;
    color: #444;
    margin: 0;
    flex: 1;          /* Chiếm hết không gian còn lại */
    text-align: center; /* Căn chữ ra giữa vùng đó */
}

.close-inner {
    cursor: pointer;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: #f0f0f0;
}

.close-inner svg { width: 12px; height: 12px; fill: #666; }

.sound-button-detail-wrapper {
    width: 220px;
    height: 220px;
    margin: 0 auto 20px auto;
}

.sound-button-detail-wrapper svg {
    width: 220px;
    height: 220px;
}


/* Tiêu đề dưới nút play */
.modal-sound-title {
    text-align: center;
    margin: 20px 0;
    font-size: 18px;
    color: #333;
    padding: 0 20px;
    font-weight: bold;
}