/* =====================================================================
   GUITAR TUNER — styles cho modal
   ===================================================================== */

/* Nút mở tuner trong transpose-bar */
.tb-btn--tuner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

#guitarTunerModal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}
#guitarTunerModal.gt-open {
    display: block;
}
.gt-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(2px);
}
.gt-box {
    position: relative;
    max-width: 420px;
    width: 92%;
    margin: 6vh auto 0;
    background: #14141f;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 20px;
    color: #f2f2f7;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    font-family: 'Montserrat', sans-serif;
}
.gt-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.gt-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}
.gt-close-btn {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 8px;
}
.gt-close-btn:hover { color: #fff; }

.gt-a4-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    color: #b8b8c4;
}
.gt-a4-row select {
    background: #1e1e2c;
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px 8px;
    font-size: 13px;
}

.gt-display {
    text-align: center;
    margin-bottom: 16px;
}
#gtNote {
    font-size: 48px;
    font-weight: 800;
    line-height: 1;
    display: block;
}
#gtFreq {
    font-size: 14px;
    color: #9a9aab;
    display: block;
    margin-top: 4px;
}

/* Kim tuner dạng cung tròn đơn giản */
.gt-gauge {
    position: relative;
    width: 220px;
    height: 110px;
    margin: 12px auto;
    overflow: hidden;
}
.gt-gauge-arc {
    position: absolute;
    top: 0; left: 0;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    border: 10px solid #26263a;
    border-bottom-color: transparent;
    box-sizing: border-box;
    transform: rotate(-90deg);
}
#gtNeedle {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 3px;
    height: 100px;
    background: #ffd54a;
    transform-origin: bottom center;
    transform: rotate(0deg);
    margin-left: -1.5px;
    border-radius: 2px;
    transition: transform 0.08s linear;
}

.gt-meter {
    height: 8px;
    border-radius: 4px;
    background: #26263a;
    margin: 10px auto 4px;
    max-width: 240px;
    transition: background 0.15s ease;
}
.gt-meter.gt-red { background: #e5484d; }
.gt-meter.gt-yellow { background: #f5c542; }
.gt-meter.gt-green { background: #45c46c; }

#gtStatus {
    text-align: center;
    font-size: 13px;
    color: #b8b8c4;
    min-height: 18px;
    margin-bottom: 16px;
}

.gt-strings {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.gt-string-btn {
    position: relative;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #1e1e2c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
}
.gt-string-oct {
    font-size: 9px;
    vertical-align: super;
    color: #9a9aab;
}
.gt-string-btn.gt-selected {
    border-color: #ffd54a;
    box-shadow: 0 0 0 1px #ffd54a inset;
}
.gt-string-btn.gt-detected {
    background: #2a4a35;
    border-color: #45c46c;
}

.gt-tones {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.gt-tone-btn {
    background: #1e1e2c;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #cfcfe0;
    border-radius: 8px;
    padding: 5px 9px;
    font-size: 12px;
    cursor: pointer;
}
.gt-tone-btn:hover { border-color: #ffd54a; color: #fff; }

.gt-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.gt-btn {
    border: none;
    border-radius: 10px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
}
.gt-btn--start { background: #45c46c; color: #06210f; }
.gt-btn--stop { background: #e5484d; color: #2a0708; }
.gt-hidden { display: none !important; }

@media (max-width: 480px) {
    .gt-box { margin-top: 10vh; padding: 16px; }
    #gtNote { font-size: 40px; }
}

/* Nút mở tuner trong toolbar public_songs.php/public_song.php (class ps-tool-btn) */
.ps-tool-btn--tuner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
