@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&display=swap');

.youglish-pronunciation-wrapper {
    --primary-bg: #f2e6f2;
    --container-bg: #ffffff;
    --text-color: #333;
    --primary-accent: #800080;
    --secondary-accent: #6a006a;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    font-family: 'Poppins', sans-serif;
    max-width: 750px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--container-bg);
    border-radius: 20px;
    box-shadow: var(--shadow);
}

.youglish-pronunciation-wrapper .search-container {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    align-items: center;
}

.youglish-pronunciation-wrapper .youglish-search-input {
    flex-grow: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.youglish-pronunciation-wrapper .youglish-search-input:focus {
    outline: none;
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(128, 0, 128, 0.15);
}

.youglish-pronunciation-wrapper .youglish-search-button {
    background: linear-gradient(145deg, #800080, #6a006a);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.8rem 1.8rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(128, 0, 128, 0.2);
}

.youglish-pronunciation-wrapper .youglish-search-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(128, 0, 128, 0.3);
}

.youglish-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.youglish-intro h2 {
    color: var(--primary-accent);
    margin-bottom: 0.5rem;
    font-size: 2rem;
}

.youglish-intro p {
    line-height: 1.7;
    color: #555;
}

.youglish-widget-container {
    margin-top: 1.5rem;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

.controls-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: #f9f9f9;
    border-radius: 10px;
}

.accent-selector {
    display: flex;
    gap: 1rem;
}

.accent-selector label {
    cursor: pointer;
    font-weight: 600;
    color: #555;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.accent-selector input[type="radio"] {
    -webkit-appearance: none;
    appearance: none;
    background-color: #fff;
    margin: 0;
    font: inherit;
    color: currentColor;
    width: 1.15em;
    height: 1.15em;
    border: 0.15em solid currentColor;
    border-radius: 50%;
    transform: translateY(-0.075em);
    display: grid;
    place-content: center;
    cursor: pointer;
}

.accent-selector input[type="radio"]::before {
    content: "";
    width: 0.65em;
    height: 0.65em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    box-shadow: inset 1em 1em var(--primary-accent);
}

.accent-selector input[type="radio"]:checked::before {
    transform: scale(1);
}

.accent-selector input[type="radio"]:checked {
    border-color: var(--primary-accent);
}

.accent-selector input[type="radio"]:hover {
    background-color: #f2e6f2;
}

.navigation-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.navigation-controls.visible {
    opacity: 1;
}

.youglish-nav-button {
    background-color: var(--primary-accent);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.youglish-nav-button:hover:not(:disabled) {
    background-color: var(--secondary-accent);
}

.nav-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.hidden {
    display: none;
}

.youglish-nav-button:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.track-indicator {
    font-weight: 600;
    color: #333;
    min-width: 60px;
    text-align: center;
}

@media (max-width: 600px) {
    .controls-container {
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
    }

    .youglish-pronunciation-wrapper .search-container {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }

    .youglish-pronunciation-wrapper .youglish-search-button {
        width: 100%;
    }

    .accent-selector {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* Hide the Fluently AI coach ad */
.g_pr_ad_network,
.fluently-speech-widget,
.youglish-pronunciation-wrapper .container.compact {
    display: none !important;
}

/* Hide the "powered by YouGlish" logo */
.pwdby,
div.pwdby {
    display: none !important;
}

.custom-powered-by {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: #777;
}

.custom-powered-by a {
    color: var(--primary-accent);
    text-decoration: none;
    font-weight: 600;
}

.custom-powered-by a:hover {
    text-decoration: underline;
}
