/**
 * Mementor Text to Speech - Shortcodes CSS
 * 
 * This file contains styles for the shortcodes section in the admin interface.
 */

/* Modern Theme Variables */
:root {
    --primary-color: #2271b1;
    --primary-hover: #135e96;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --border-color: #e2e4e7;
    --text-primary: #1d2327;
    --text-secondary: #50575e;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.07);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
}

/* Main Layout */
.wrap .mementor-tts-wrap {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: var(--spacing-lg) 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xl);
}

/* Section Headers */
.wrap .mementor-tts-section-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-md);
    border-bottom: 2px solid var(--primary-color);
}

.wrap .mementor-tts-section-header h2 {
    color: var(--text-primary);
    font-size: 1.5em;
    margin: 0 0 var(--spacing-xs);
}

.wrap .mementor-tts-section-header .description {
    color: var(--text-secondary);
    margin: 0;
}

/* Left Column - Shortcode Examples */
.wrap .mementor-tts-examples {
    grid-column: 1;
}

/* Shortcode Cards - Modern Design */
.wrap .mementor-tts-shortcode-card {
    background-color: var(--bg-white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.wrap .mementor-tts-shortcode-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.wrap .mementor-tts-shortcode-header {
    background-color: var(--bg-light);
    border-bottom: 1px solid var(--border-color);
    padding: var(--spacing-md) var(--spacing-lg);
}

.wrap .mementor-tts-shortcode-header h3 {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.2em;
}

.wrap .mementor-tts-shortcode-content {
    padding: var(--spacing-lg);
}

/* Parameters Table */
.wrap .mementor-tts-parameters-table {
    display: grid;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-light);
    border-radius: var(--radius-md);
    margin-top: var(--spacing-lg);
}

.wrap .mementor-tts-parameter-row {
    display: grid;
    grid-template-columns: 150px 1fr 200px;
    gap: var(--spacing-md);
    padding: var(--spacing-sm);
    align-items: center;
    border-bottom: 1px solid var(--border-color);
}

.wrap .mementor-tts-parameter-row:last-child {
    border-bottom: none;
}

.wrap .mementor-tts-parameter-row.header {
    font-weight: 600;
    background-color: var(--bg-white);
    border-radius: var(--radius-sm);
}

/* Right Column - Generator */
.wrap .mementor-tts-shortcode-generator {
    grid-column: 2;
    position: sticky;
    top: 32px;
    align-self: start;
}

/* Generator Form */
.wrap .mementor-tts-generator-form {
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* Main Generator Layout */
.wrap .mementor-tts-generator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Text Input Section */
.wrap .mementor-tts-text-section {
    margin: 0;
}

.wrap .mementor-tts-text-section label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--text-primary);
    font-weight: 500;
}

label.voiceid {
    font-weight: 500;
    font-size: 1em;
}
input#shortcode_voice_id {
    margin-top: 5px;
}

.wrap #shortcode_text {
    width: 100%;
    min-height: 398px;
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    resize: vertical;
}

/* Player Options Section */
.wrap .mementor-tts-generator-options {
    margin: 0;
}

.wrap .mementor-tts-generator-options h4 {
    margin-top: 0;
    margin-bottom: var(--spacing-md);
    color: var(--text-primary);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--spacing-xs);
}

/* Form Controls - 4x2 Grid */
.wrap .mementor-tts-generator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

/* Toggle Switch */
.wrap .mementor-tts-toggle {
    background: var(--bg-white);
    padding: var(--spacing-md) var(--spacing-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    text-align: center;
}

.wrap .mementor-tts-toggle label {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 0.9em;
    cursor: pointer;
    user-select: none;
    margin-bottom: 0;
}

/* First row toggles */
.wrap .mementor-tts-toggle:nth-child(-n+4) {
    border-top-width: 0;
}

/* First column toggles */
.wrap .mementor-tts-toggle:nth-child(4n+1) {
    border-left-width: 0;
}

/* Last column toggles */
.wrap .mementor-tts-toggle:nth-child(4n) {
    border-right-width: 0;
}

/* Last row toggles */
.wrap .mementor-tts-toggle:nth-child(n+5) {
    border-bottom-width: 0;
}

/* Corner radius for first toggle */
.wrap .mementor-tts-toggle:first-child {
    border-top-left-radius: 0;
}

/* Corner radius for last toggle in first row */
.wrap .mementor-tts-toggle:nth-child(4) {
    border-top-right-radius: 0;
}

/* Corner radius for first toggle in last row */
.wrap .mementor-tts-toggle:nth-child(5) {
    border-bottom-left-radius: 0;
}

/* Corner radius for last toggle */
.wrap .mementor-tts-toggle:last-child {
    border-bottom-right-radius: 0;
}

.wrap .mementor-tts-toggle:hover {
    border-color: transparent;
    z-index: 1;
    position: relative;
}

.wrap .mementor-tts-switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 20px;
    flex-shrink: 0;
}

.wrap .mementor-tts-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wrap .mementor-tts-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 20px;
}

.wrap .mementor-tts-slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.wrap .mementor-tts-switch input:checked + .mementor-tts-slider {
    background-color: var(--primary-color);
}

.wrap .mementor-tts-switch input:checked + .mementor-tts-slider:before {
    transform: translateX(16px);
}

/* Voice ID Section */
.wrap .mementor-tts-voice-section {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.wrap .mementor-tts-voice-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.wrap .mementor-tts-voice-section input[type="text"] {
    width: 100%;
    margin-bottom: 8px;
}

.wrap .mementor-tts-voice-section .description {
    color: #666;
    font-style: italic;
    margin: 0;
    font-size: 13px;
}

.wrap .mementor-tts-voice-section input[disabled] {
    background-color: #f1f1f1;
    cursor: not-allowed;
}

/* Generated Shortcode Output */
.wrap .mementor-tts-generator-output {
    margin-top: var(--spacing-xl);
    background: var(--bg-white);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

.wrap .mementor-tts-generator-output h4 {
    margin: 0 0 var(--spacing-md);
    color: var(--text-primary);
    font-weight: 500;
}

.wrap .mementor-tts-shortcode-code {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: var(--bg-white);
    padding: var(--spacing-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}

.wrap .mementor-tts-shortcode-code code {
    flex-grow: 1;
    font-family: monospace;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
}

/* Copy Button */
.wrap .mementor-tts-copy-button {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: var(--spacing-xs) var(--spacing-sm);
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.wrap .mementor-tts-copy-button:hover {
    background: var(--primary-color);
    color: var(--bg-white);
    border-color: var(--primary-color);
}

/* PRO Label */
.wrap .mementor-tts-pro-label {
    background: #007cba;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 6px;
    text-transform: uppercase;
    vertical-align: middle;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .wrap .mementor-tts-generator-main {
        grid-template-columns: 1fr;
    }
    
    .wrap .mementor-tts-generator-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 782px) {
    .wrap .mementor-tts-generator-grid {
        grid-template-columns: 1fr;
    }
}

/* Demo Notice */
.wrap .mementor-tts-demo-notice {
    background: #fff8e5;
    border-left: 4px solid #f0b849;
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-xl);
    border-radius: var(--radius-sm);
}

.wrap .mementor-tts-demo-notice p {
    margin: var(--spacing-xs) 0;
    color: #614200;
}

.wrap .mementor-tts-demo-notice .dashicons {
    color: #f0b849;
    margin-right: var(--spacing-xs);
} 