/* ==================================================
   4. HỆ THỐNG NÚT PLAY
   ================================================== */

/* Các nút hành động (Play/Download) - Kiểu cơ bản */
.ringtone-action-button-container button,
.action-button-container-col button {
    border-radius: 20px;        /* Bo tròn góc */
    text-decoration: none;      /* Bỏ gạch chân */
    font-weight: 500;          /* Độ đậm chữ */
    white-space: nowrap;       /* Không xuống dòng */
    vertical-align: middle;    /* Căn giữa theo chiều dọc */
    background: #e3e3e3;       /* Màu nền xám nhạt */
    color: #306179;            /* Màu chữ xanh */
    padding: 2px 6px;          /* Khoảng cách trong */
    font-size: 70%;            /* Kích thước chữ nhỏ */
    border: none;              /* Bỏ viền */
    cursor: pointer;           /* Con trỏ dạng tay */
    transition: all 0.2s ease; /* Hiệu ứng chuyển đổi mượt */
    text-shadow: 0 0 0 transparent; /* Bóng chữ trong suốt */
}

/* Đồng bộ kích thước cho các nút trong cột hành động */
.ringtone-action-button-container button,
.action-button-container-col button {
    height: 16px;             /* Chiều cao cố định */
    display: flex;             /* Bố cục linh hoạt */
    align-items: center;       /* Căn giữa theo chiều dọc */
    justify-content: center;   /* Căn giữa theo chiều ngang */
}

/* Hiệu ứng khi di chuột qua nút hành động */
.ringtone-action-button-container button:hover,
.action-button-container-col button:hover {
    background-color: #D0D0D0; /* Màu nền tối hơn khi hover */
    color: #333333;            /* Màu chữ tối hơn */
    transform: translateY(-1px); /* Nâng nút lên 1px */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3); /* Bóng chữ nhẹ */
}

/* Kiểu cơ bản cho các nút Play */
.ringtone-output .arm-button-play,
.ringtone-output .arm-button-play-error,
.ringtone-history .download-col .arm-button-download {
    position: relative;        /* Vị trí tương đối */
    vertical-align: middle;    /* Căn giữa theo chiều dọc */
    width: auto;               /* Chiều rộng tự động */
    border: none;              /* Bỏ viền */
    cursor: pointer;           /* Con trỏ dạng tay */
    display: flex;             /* Bố cục linh hoạt */
    align-items: center;       /* Căn giữa theo chiều dọc */
    gap: 5px;                  /* Khoảng cách giữa các phần tử */
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}



/* Căn chỉnh riêng cho nút Play */
.ringtone-output .arm-button-play,
.ringtone-output .arm-button-play-error {
    text-align: left;         
    padding: 0 8px 0 20px;     
}

/* Căn chỉnh riêng cho nút Download */
.ringtone-history .download-col .arm-button-download {
    text-align: center;
    justify-content: center;  
    padding: 0 8px;          
}

/* Kiểu cho nút Download chính */
.ringtone-output .arm-button-download {
    position: relative;        /* Vị trí tương đối */
    vertical-align: middle;    /* Căn giữa theo chiều dọc */
    width: auto;               /* Chiều rộng tự động */
    border: none;              /* Bỏ viền */
    cursor: pointer;           /* Con trỏ dạng tay */
    display: flex;             /* Bố cục linh hoạt */
    align-items: center;       /* Căn giữa theo chiều dọc */
    justify-content: center;   /* Căn giữa theo chiều ngang */
    text-align: center;        /* Căn giữa text */
    padding: 0 8px;            /* Khoảng cách trong */
    background: #e3e3e3;       /* Màu nền xám nhạt */
    color: #306179;            /* Màu chữ xanh */
    border-radius: 20px;       /* Bo tròn góc */
    font-weight: 500;          /* Độ đậm chữ */
    font-size: 70%;            /* Kích thước chữ nhỏ */
    transition: all 0.2s ease; /* Hiệu ứng chuyển đổi mượt */
}

/* Hiệu ứng hover cho nút Download chính */
.ringtone-output .arm-button-download:hover {
    background-color: #D0D0D0; /* Màu nền tối hơn khi hover */
    color: #333333;            /* Màu chữ tối hơn */
    transform: translateY(-1px); /* Nâng nút lên 1px */
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3); /* Bóng chữ nhẹ */
}

/* Kiểu cho nút Play khi đang phát */
.ringtone-output .arm-button-play.arm-playing {
    background-color: #4353ff;
    color: white;
}

/* Icon pause màu trắng khi đang phát */
.ringtone-output .arm-button-play.arm-playing .arm-icon-pause {
    filter: brightness(0) invert(1); /* Chuyển thành màu trắng */
}

/* Kiểu cho nút Play khi có lỗi */
.ringtone-output .arm-button-play.arm-button-play-error {
    background-color: #ff6b6b;
    color: white;
}

/* Văn bản trong nút Play */
.ringtone-output .arm-button-play .arm-button-text {
    white-space: nowrap;
    font-weight: bold;
}

/* Kiểu cơ bản cho các icon Play/Pause */
.ringtone-output .arm-icon-play,
.ringtone-output .arm-icon-pause {
    width: 10px;
    height: 10px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    top: 50%;
    left: 6px;
    transform: translateY(-50%);
    flex-shrink: 0;
}

/* Hình ảnh cho icon Play */
.ringtone-output .arm-icon-play {
    background-image: url('images/play-button.png');
}

/* Hình ảnh cho icon Pause */
.ringtone-output .arm-icon-pause {
    background-image: url('images/pause-button.png');
}

.ringtone-output .default-play-button .icon-play {
    width: 10px !important;
    height: 10px !important;
    background-image: none !important;
}

/* ==================================================
   5. HIỂN THỊ KẾT QUẢ RINGTONE
   ================================================== */


/* Kết thúc css Play audio */
#ringtone-history-list .arm-button-play,
#ringtone-history-list .arm-button-play-error {
    position: relative;
    vertical-align: middle;
    width: 20px;
    height: auto; /* Để giữ tỷ lệ hình vuông */
    aspect-ratio: 1; /* Để giữ tỷ lệ hình vuông */
    padding: 0;
    margin-right: 5px;
    border-radius: 2px;
    cursor: pointer;
    background-color: #e0e0e1;
    border: 1px solid #e0e0e1;
    text-align: center;
}

#ringtone-history-list .arm-icon-play,
#ringtone-history-list .arm-icon-pause {
    width: 10px;
    height: 10px;
    display: inline-block;
    background-repeat: no-repeat;
    background-size: contain;
    position: absolute;
    /*top: 50%;
    left: 50%;*/
    transform: translate(-50%, -50%);
}
#ringtone-history-list .arm-icon-play {
    background-image: url(images/play-button.png);
}
#ringtone-history-list .arm-icon-pause {
    background-image: url(images/pause-button.png);
}
/* Kết thúc css Play audio */

#ringtone-history-list .play-col {
    flex: 0 0 20px;
    justify-content: center;
}

/* CSS cho nút xóa lịch sử */
.ringtone-history-actions {
    text-align: right;
    padding: 10px 0px 5px 0px;
    border-top: 1px solid #e0e0e0;
}

.arm-button-clear-history {
    background-color: #e3e3e3;
    color: #306179;
    border: none;
    padding: 2px 14px;
    margin-right: 10px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 80%;
    transition: all 0.2s ease;
}

.arm-button-clear-history:hover {
    background-color: #c82333;
    color: #fff;
    transform: translateY(-1px);
    text-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
}

.arm-button-clear-history:active {
    background-color: #bd2130;
}

.arm-button-clear-history:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}