/* Generator Page Styles
   ========================================================================== */

/* Pill Tabs */
.tts-pill-tabs {
    display: flex;
    margin-top: 30px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    width: 100%;
}

.tts-pill-tab {
    padding: 8px 16px;
    margin-right: 10px;
    border: 1px solid #ccc;
    border-radius: 20px;
    background: #f6f7f7;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.tts-pill-tab:hover {
    border: 1px solid #2271b1!important;
}

.tts-pill-tab.active {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.tts-pill-tab:hover:not(.active) {
    background: var(--tts-bg-subtle, #f6f7f7);
}

/* Tab Content Styles */
.tts-tab-content {
    margin-top: 20px;
}

/* Voice Settings Row */
.mementor-tts-voice-settings-row {
    display: flex;
    align-items: center;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    margin-bottom: 0;
    gap: 15px;
    box-shadow: none;
}

.mementor-tts-voice-avatar {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 20px;
}

.mementor-tts-voice-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.2);
}

.mementor-tts-current-voice-info {
    flex: 1;
}

.mementor-tts-current-voice-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--tts-text-primary, #1a1a1a);
}

.mementor-tts-current-voice-info p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.mementor-tts-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
} 

.mementor-tts-change-voice-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px!important;
    line-height: 1.75!important;
    padding: 8px 12px!important;
    border: 1px solid #c6e6ff!important;
    border-radius: 4px!important;
}

.mementor-tts-credits-badge {
    display: inline-block;
    padding: 10px 12px;
    background: #eff9ff;
    border: 1px solid #c6e6ff;
    border-radius: 4px;
    font-size: 13px;
    color: #333;
}

.mementor-tts-credits-badge strong {
    color: #2271b1;
    font-weight: 500;
}

/* Main Work Area */
.mementor-tts-flex-container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
    margin-top: 24px;
    margin-bottom: 20px;
}

.mementor-tts-input-column {
    flex: 3;
}

.mementor-tts-controls-column {
    flex: 1;
    min-width: 220px;
    position: sticky;
    top: 96px;
}

/* PRO Users - Full width for input column */
.mementor-tts-flex-container.mementor-tts-pro-active {
    grid-template-columns: 1fr;
}

.mementor-tts-flex-container.mementor-tts-pro-active .mementor-tts-input-column {
    width: 100%;
}

.mementor-tts-flex-container.mementor-tts-pro-active .mementor-tts-controls-column {
    display: none;
}

/* Text Input Area */
.mementor-tts-text-input-container {
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
}

.mementor-tts-text-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.textarea-label {
    font-size: 17px;
    font-weight: 500;
    margin-left: 10px;
}

#mementor-tts-reset-btn {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* SSML Toolbar */
.mementor-tts-ssml-toolbar {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
}

.mementor-tts-ssml-toolbar-left {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    align-items: center;
}

.mementor-tts-ssml-toolbar-right {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
    margin-left: auto;
}

.mementor-tts-toolbar-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 6px 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
    white-space: nowrap;
    font-size: 12px;
}

.mementor-tts-toolbar-checkbox:hover {
    background: #f0f8ff;
    border-color: #2271b1;
}

.mementor-tts-toolbar-checkbox input[type="checkbox"] {
    position: relative;
    width: 16px;
    height: 16px;
    margin: 0 8px 0 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 3px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.mementor-tts-toolbar-checkbox input[type="checkbox"]:checked {
    background: #2271b1;
    border-color: #2271b1;
}

.mementor-tts-toolbar-checkbox input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 1px;
    left: 4px;
    width: 4px;
    height: 8px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mementor-tts-toolbar-checkbox span {
    color: #333;
    font-weight: 500;
}

/* Desktop: Keep checkboxes on the right side */
@media screen and (min-width: 1200px) {
    .mementor-tts-ssml-toolbar {
        flex-wrap: nowrap;
    }

    .mementor-tts-ssml-toolbar-right {
        flex-shrink: 0;
    }
}

/* Medium screens: Allow some wrapping but keep right aligned */
@media screen and (min-width: 783px) and (max-width: 1199px) {
    .mementor-tts-ssml-toolbar-left {
        flex: 0 1 auto;
        max-width: calc(100% - 400px);
    }

    .mementor-tts-ssml-toolbar-right {
        flex-shrink: 0;
    }
}

.mementor-tts-ssml-btn {
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 5px;
    border: 1px solid #ccc;
    background: #f6f7f7;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    max-height: 33px;
}

.mementor-tts-ssml-btn:hover:not(.disabled) {
    background: #eee;
    border-color: #999;
    filter: brightness(1.10);
}

.mementor-tts-ssml-btn .dashicons {
    font-size: 16px;
    height: 16px;
    width: 16px;
    margin-right: 4px;
}

.mementor-tts-ssml-btn.disabled,
.mementor-tts-pro-feature {
    color: #586572;
    opacity: 0.8;
    cursor: help!important;
    background-color: #f8f8f8;
    border: 1px dashed #ccc;
    position: relative;
}

.mementor-tts-pro-feature[disabled] {
    cursor: help!important;
    pointer-events: auto!important;
}

/* PRO Badge Styling */
/* .pro-badge now styled by tts-admin-redesign.css (.tts-pro-badge) */

/* Textarea */
#mementor-tts-text {
    width: 100%;
    resize: vertical;
    min-height: 200px;
    height: 260px;
    padding: 15px 20px;
    font-family: "Helvetica Neue", sans-serif;
    font-size: 17px;
    font-weight: 500;
    line-height: 1.7;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-top: 8px;
}

.mementor-tts-char-counter {
    margin-top: 8px;
    font-size: 13px;
    color: var(--tts-text-secondary, #646970);
    text-align: right;
}

.mementor-tts-char-limit-warning {
    color: #d63638;
}

/* Tips & PRO Upsell Box */
.mementor-tts-tips-box {
    background: #f8f9fa;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 20px;
    height: 100%;
    overflow: hidden;
    transition: all 0.3s ease;
}

.mementor-tts-tips-box h3 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 500;
    color: var(--tts-text-primary, #333);
    display: flex;
    align-items: center;
    gap: 5px;
}

.mementor-tts-tips-box ul,
.mementor-tts-tips-list {
    margin: 10px 0;
    padding-left: 20px;
}

.mementor-tts-tips-box li {
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 15px;
}

.mementor-tts-hidden-tip,
.mementor-tts-tips-box li.hidden {
    display: none;
}

.mementor-tts-tips-toggle,
.mementor-tts-show-more {
    background: transparent;
    border: none;
    color: var(--tts-accent, #2271b1);
    padding: 0;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 10px;
    font-weight: 500;
    text-decoration: none;
}

.mementor-tts-tips-toggle:hover,
.mementor-tts-show-more:hover {
    text-decoration: underline;
}

.mementor-tts-show-more .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.mementor-tts-show-more[aria-expanded="true"] .dashicons {
    transform: rotate(180deg);
}

.mementor-tts-show-less {
    display: none;
}

.mementor-tts-tips-expanded .mementor-tts-hidden-tip {
    display: list-item;
}

.mementor-tts-tips-expanded .mementor-tts-show-more {
    display: none;
}

.mementor-tts-tips-expanded .mementor-tts-show-less {
    display: inline;
}

/* PRO Upsell Box */
.mementor-tts-pro-upsell {
    background: #fff8e5;
    border: 1px solid #ffd670;
    border-radius: 4px;
    padding: 16px;
    font-size: 14px;
    margin-bottom: 16px;
}

.mementor-tts-pro-upsell h3 {
    margin: 0 0 12px 0;
    color: var(--tts-text-primary, #333);
    font-size: 16px;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.mementor-tts-pro-upsell ul {
    margin: 12px 0 20px 0;
    padding-left: 24px;
}

.mementor-tts-pro-upsell li {
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.mementor-tts-pro-upsell .button {
    display: inline-block;
    margin-top: 8px;
    background: #e32c26;
    border-color: #e32c26;
    color: white;
    text-transform: uppercase;
    font-weight: 500;
    padding: 6px 12px;
    height: auto;
    font-size: 13px;
}

.mementor-tts-pro-button {
    margin-top: 10px;
    width: 100%;
    text-align: center;
}

/* Action Row & Buttons */
.mementor-tts-action-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: #f6f7f7;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    margin-top: 20px;
}

.mementor-tts-action-buttons {
    display: flex;
    gap: 10px;
}

.mementor-tts-action-buttons .button {
    border-radius: 4px;
    font-size: 14px;
    padding: 6px 12px;
    transition: filter 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 180px;
}

.mementor-tts-action-buttons .button:hover {
    filter: brightness(1.10);
}

/* Green Generate Button State */
.mementor-tts-generate-btn {
    background-color: #009b51 !important;
    border-color: #008043 !important;
}

/* Shortcode Display */
.mementor-tts-shortcode-display {
    margin-top: 15px;
    padding: 10px 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.mementor-tts-shortcode-label {
    font-weight: 500;
    margin-bottom: 5px;
    color: #555;
}

#mementor-tts-shortcode-text {
    background: #fff;
    padding: 8px 12px;
    border-radius: 3px;
    border: 1px solid #ddd;
    margin: 0;
    overflow-x: auto;
    font-family: monospace;
}

/* Shortcode Customizer */
.mementor-tts-shortcode-customizer {
    margin-top: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.mementor-tts-shortcode-customizer h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.mementor-tts-customizer-options {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

/* Text input option for custom label */
.mementor-tts-customizer-text-option {
    grid-column: 1 / -1; /* Span full width */
    padding: 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.mementor-tts-customizer-text-option label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.mementor-tts-customizer-text-option input[type="text"] {
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.mementor-tts-customizer-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 8px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s ease;
    user-select: none;
}

.mementor-tts-customizer-option:hover {
    background: #f0f8ff;
    border-color: #2271b1;
}

.mementor-tts-customizer-option input[type="checkbox"] {
    position: relative;
    width: 18px;
    height: 18px;
    margin: 0 8px 0 0;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: #fff;
    border: 2px solid #ccc;
    border-radius: 3px;
    transition: all 0.2s ease;
}

.mementor-tts-customizer-option input[type="checkbox"]:checked {
    background: #2271b1;
    border-color: #2271b1;
}

.mementor-tts-customizer-option input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 0px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.mementor-tts-customizer-option span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Permanent Shortcode Display */
.mementor-tts-shortcode-display-permanent {
    margin-top: 12px;
    padding: 12px;
    background: var(--tts-bg-primary, #fff);
    border: 1px solid var(--tts-border-color, #e2e2e2);
    border-radius: var(--tts-radius-md, 8px);
    text-align: center;
}

.mementor-tts-shortcode-display-permanent .mementor-tts-shortcode-label {
    font-weight: 600;
    font-size: 14px;
    color: #2271b1;
    margin-bottom: 8px;
}

#mementor-tts-shortcode-realtime {
    background: #fff;
    padding: 12px 20px;
    border-radius: 4px;
    border: 2px solid #2271b1;
    margin: 0;
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    font-weight: 600;
    color: #2271b1;
    display: inline-block;
    user-select: all;
    cursor: text;
}

/* Control Groups */
.mementor-tts-control-group {
    margin-bottom: 20px;
    background: white;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 15px;
}

.mementor-tts-control-group h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 500;
}

/* Emotion Grid */
.mementor-tts-emotion-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.mementor-tts-emotion-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 13px;
}

.mementor-tts-emotion-checkbox input {
    margin-right: 5px;
}

/* PRO Coming Soon */
.mementor-tts-pro-coming-soon {
    background: #fff8e5;
    border: 1px solid #ffedb6;
    border-radius: 4px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.mementor-tts-pro-coming-soon h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #b7860b;
}

.mementor-tts-pro-coming-soon p {
    margin: 0;
    font-size: 13px;
}

/* PRO Feature Notice */

.mementor-tts-pro-feature {
    margin:0 0 0 8px;
}

.dashicons-star-filled {
    margin-right: 5px;
}

.mementor-tts-pro-feature-notice {
    display: flex;
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 20px;
    align-items: center;
}

.mementor-tts-pro-icon {
    font-size: 36px;
    margin-right: 20px;
    color: #ff5722;
}

.mementor-tts-pro-message h3 {
    margin-top: 0;
    color: #ff5722;
}

/* Tooltip Styling */
.mementor-tts-tooltip {
    position: absolute;
    z-index: 9999; /* Reduced from 99999 to prevent conflicts with other plugins */
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    padding: 15px;
    width: 420px;
    max-width: 90vw;
    line-height: 1.5;
    display: none;
    pointer-events: auto !important; /* Ensure tooltip is interactive */
}

.mementor-tts-tooltip p {
    font-size: 15px;
    margin: 0 0 10px;
}

.mementor-tts-tooltip p:last-of-type {
    margin-bottom: 0;
}

/* Force tooltip visibility when shown */
.mementor-tts-tooltip:not([style*="display: none"]) {
    display: block !important;
}

.mementor-tts-model-notice {
    background: #fff8e5;
    border: 1px solid #ffcd00;
    border-radius: 6px;
    padding: 12px 15px;
    margin: 15px 0;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.mementor-tts-model-notice .dashicons {
    color: #996800;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 18px;
    width: 18px;
    height: 18px;
}

.mementor-tts-model-notice span:last-child {
    flex: 1;
    color: #50575e;
}

.mementor-tts-tooltip-footer {
    margin-top: 15px;
    text-align: center;
}


.mementor-tts-tooltip-play-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    font-size: 14px;
    background: #2271b1;
    border-color: #2271b1;
    color: white;
    transition: all 0.2s ease;
}

.mementor-tts-tooltip-play-btn:hover {
    background: #135e96;
    border-color: #135e96;
    color: white;
}

.mementor-tts-tooltip-play-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    margin-right: 2px;
}


/* Message Container */
#mementor-tts-messages {
    position: fixed;
    top: 32px; /* Below WordPress admin bar */
    right: 20px;
    z-index: 9999; /* Reduced from 99999 to prevent conflicts with other plugins */
    max-width: 400px;
}

/* Message Styles */
.mementor-tts-message {
    padding: 12px 20px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-size: 14px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    animation: slideInRight 0.3s ease-out;
    position: relative;
}

.mementor-tts-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.mementor-tts-message.error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Slide in animation */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Fade out animation */
@keyframes fadeOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* SSML Code Styling */
.ssml-code {
    color: green;
    font-weight: 500;
}

/* Animation for loading state */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinning,
.dashicons-spin {
    display: inline-block;
    animation: spin 2s infinite linear;
}

.dashicons-update-loading {
    animation: spin 1s infinite linear;
}

/* Loading state for buttons */
.mementor-tts-loading {
    opacity: 0.7;
    pointer-events: none;
}

.mementor-tts-loading:after {
    content: '...';
}

.mementor-tts-loading-btn {
    opacity: 0.8;
    position: relative;
    pointer-events: none;
}

.mementor-tts-loading-btn:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

/* History Section */
.mementor-tts-history-section {
    margin-top: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
}

.mementor-tts-history-header {
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e2e4e7;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.mementor-tts-history-header:hover {
    background: #f8f9fa;
}

.mementor-tts-history-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mementor-tts-history-count {
    color: #646970;
    font-weight: 400;
    font-size: 14px;
}

.mementor-tts-history-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.mementor-tts-history-header.expanded .mementor-tts-history-arrow {
    transform: rotate(180deg);
}

.mementor-tts-history-content {
    padding: 20px;
}

.mementor-tts-history-empty {
    text-align: center;
    color: #646970;
    font-style: italic;
}

.mementor-tts-history-empty p {
    margin: 0;
}

.mementor-tts-history-list {
    display: none; /* Hidden when empty */
}

.mementor-tts-history-item {
    background: #fff;
    border: 1px solid #e2e4e7;
    border-radius: 4px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.mementor-tts-history-item:last-child {
    margin-bottom: 0;
}

.mementor-tts-history-item-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.mementor-tts-history-item-info {
    flex: 1;
}

.mementor-tts-history-date {
    font-size: 13px;
    color: #646970;
    margin-bottom: 4px;
}

.mementor-tts-history-text {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    max-width: 400px;
}

.mementor-tts-history-voice {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

.mementor-tts-history-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.mementor-tts-history-btn {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #ccc;
    background: #fff;
    border-radius: 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
    text-decoration: none;
}

.mementor-tts-history-btn:hover {
    background: #f0f8ff;
    border-color: #2271b1;
    color: #2271b1;
}

.mementor-tts-history-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.mementor-tts-history-btn-play {
    color: #00a32a;
}

.mementor-tts-history-btn-play:hover {
    background: #f0f6f0;
    border-color: #00a32a;
    color: #00a32a;
}

.mementor-tts-history-btn-restore {
    color: #2271b1;
}

.mementor-tts-history-btn-copy {
    color: #646970;
}

.mementor-tts-history-btn-download {
    color: #2271b1;
}

.mementor-tts-history-btn-download:hover {
    background: #f0f8ff;
    border-color: #2271b1;
    color: #135e96;
}

.mementor-tts-history-btn-delete {
    color: #b32d2e;
}

.mementor-tts-history-btn-delete:hover {
    background: #fef1f1;
    border-color: #b32d2e;
    color: #8a2424;
}

.mementor-tts-history-shortcode {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f6f7f7;
    border-radius: 3px;
    font-family: monospace;
    font-size: 12px;
    color: #333;
    border: 1px solid #e2e4e7;
    overflow-x: auto;
}

/* Helper Classes */
.mementor-tts-hidden {
    display: none !important;
}

/* Responsive Styles */
@media screen and (max-width: 782px) {
    #mementor-tts-messages {
        top: 46px; /* WordPress mobile admin bar height */
        left: 10px;
        right: 10px;
        max-width: none;
    }
    
    .mementor-tts-customizer-options {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 8px;
    }
    
    .mementor-tts-customizer-option {
        padding: 6px 10px;
    }
    
    .mementor-tts-customizer-option span {
        font-size: 13px;
    }
}

@media screen and (max-width: 880px) {
    .mementor-tts-flex-container {
        grid-template-columns: 1fr;
    }
    
    .mementor-tts-controls-column {
        position: static;
    }
    
    .mementor-tts-voice-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .mementor-tts-credits-badge {
        margin: 10px 0 0 0;
        width: 100%;
        text-align: center;
    }
    
    .mementor-tts-action-row {
        flex-direction: column;
        gap: 15px;
    }
    
    .mementor-tts-counters {
        width: 100%;
        text-align: center;
    }
}

@media screen and (max-width: 782px) {
    .mementor-tts-voice-settings-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .mementor-tts-voice-avatar {
        width: 60px;
        height: 60px;
    }

    .mementor-tts-voice-actions,
    .mementor-tts-header-actions {
        position: relative;
        top: 0;
        margin-top: 15px;
        text-align: right;
    }

    .mementor-tts-sticky-actions {
        flex-direction: column;
        gap: 15px;
    }

    .mementor-tts-action-buttons {
        flex-wrap: wrap;
        justify-content: center;
    }

    .mementor-tts-counters {
        justify-content: center;
    }

    /* Toolbar responsive */
    .mementor-tts-ssml-toolbar {
        flex-wrap: wrap;
    }

    .mementor-tts-ssml-toolbar-left {
        width: 100%;
        order: 1;
    }

    .mementor-tts-ssml-toolbar-right {
        width: 100%;
        order: 2;
        margin-left: 0;
        margin-top: 10px;
    }

    .mementor-tts-toolbar-checkbox {
        flex: 1;
        justify-content: center;
        min-width: 45%;
    }
}

@media screen and (max-width: 600px) {
    .mementor-tts-voice-card {
        padding: 16px;
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .mementor-tts-voice-avatar {
        margin: 0 auto;
    }
    
    .mementor-tts-voice-metadata {
        text-align: center;
    }
    
    .mementor-tts-voice-actions {
        margin: 16px auto 0;
    }

    /* History buttons responsive */
    .mementor-tts-history-actions {
        flex-wrap: wrap;
        gap: 6px;
    }

    .mementor-tts-history-btn {
        flex: 1 1 calc(50% - 3px);
        min-width: calc(50% - 3px);
        justify-content: center;
        font-size: 12px;
        padding: 5px 8px;
    }

    .mementor-tts-history-item-header {
        flex-direction: column;
        gap: 12px;
    }

    .mementor-tts-history-actions {
        width: 100%;
    }
}

/* ======= Model Selector Section ======= */
.mementor-tts-model-selector-wrapper {
    margin-bottom: 0 !important;
}

.mementor-tts-model-section-toggle {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    background: var(--tts-bg-primary, #fff) !important;
    border: 1px solid var(--tts-border-color, #e2e2e2) !important;
    border-radius: var(--tts-radius-md, 8px) !important;
    padding: 10px 14px !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    color: var(--tts-text-primary, #1a1a1a) !important;
}

.mementor-tts-model-section-toggle:hover {
    background: #fff !important;
    border-color: #2271b1 !important;
}

.mementor-tts-model-section-toggle .dashicons {
    transition: transform 0.2s ease !important;
    color: #2271b1 !important;
}

.mementor-tts-model-section-toggle[aria-expanded="false"] .dashicons {
    transform: rotate(-90deg) !important;
}

.mementor-tts-model-selector-section {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 20px !important;
    transition: all 0.3s ease !important;
    max-height: 2000px !important;
    opacity: 1 !important;
    overflow: hidden !important;
}

.mementor-tts-model-selector-section.collapsed {
    max-height: 0 !important;
    opacity: 0 !important;
    margin-bottom: 0 !important;
}

.mementor-tts-model-info-card,
.mementor-tts-model-selector-card {
    background: #fff !important;
    border: 1px solid #dcdcde !important;
    border-radius: 8px !important;
    padding: 24px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
}

.mementor-tts-model-info-card h3,
.mementor-tts-model-selector-card h3 {
    margin: 0 0 20px 0 !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1d2327 !important;
}

/* Model Info List */
.mementor-tts-model-info-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.mementor-tts-model-info-item {
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f1;
}

.mementor-tts-model-info-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.mementor-tts-model-info-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.mementor-tts-model-info-header strong {
    font-size: 14px;
    color: #1d2327;
}

.mementor-tts-model-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.mementor-tts-model-badge.free {
    background: #00a32a;
    color: #fff;
}

.mementor-tts-model-badge.pro {
    background: linear-gradient(135deg, #7854E4 0%, #6844d1 100%);
    color: #fff;
}

.mementor-tts-model-info-item p {
    margin: 0;
    font-size: 13px;
    color: #50575e;
    line-height: 1.6;
}

/* Model Selector Toggles */
.mementor-tts-model-toggles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.mementor-tts-model-toggle {
    padding: 16px 20px !important;
    background: #fff !important;
    border: 2px solid #e0e0e0 !important;
    border-radius: 8px !important;
    color: #2c3338 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    transition: all 0.2s ease;
    outline: none !important;
    font-weight: 500 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: center !important;
    gap: 4px !important;
    text-align: left !important;
    position: relative;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mementor-tts-model-toggle:hover:not(.mementor-tts-model-disabled):not(.active) {
    border-color: #2271b1 !important;
    box-shadow: 0 2px 6px rgba(34, 113, 177, 0.15);
    transform: translateX(4px);
}

.mementor-tts-model-toggle.active {
    background: linear-gradient(135deg, #2271b1 0%, #1557a0 100%) !important;
    border-color: #135e96 !important;
    color: #fff !important;
    box-shadow: 0 4px 12px rgba(34, 113, 177, 0.3);
}

.mementor-tts-model-toggle.active::after {
    content: '✓';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background: #135e96;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
    color: #fff;
}

.mementor-tts-model-name {
    font-weight: 600;
    display: block;
    font-size: 14px;
}

.mementor-tts-model-meta {
    font-size: 12px;
    opacity: 0.75;
    display: block;
    line-height: 1.4;
}

.mementor-tts-model-toggle.active .mementor-tts-model-meta {
    opacity: 0.95;
}

.mementor-tts-model-toggle.mementor-tts-model-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    background: #f6f7f7 !important;
    border-color: #e0e0e0 !important;
}

.mementor-tts-model-toggle.mementor-tts-model-disabled:hover {
    transform: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.mementor-tts-model-toggle .tts-pro-badge {
    margin-top: 4px;
}

/* Responsive adjustments */
@media screen and (max-width: 1200px) {
    .mementor-tts-model-selector-section {
        grid-template-columns: 1fr;
    }
}