/**
 * Text to Sound Effects Generator - Frontend Styles
 */

/* Container Styles */
.atsfx-generator-container {
    margin: 0 auto;
    padding: 0;
    padding-bottom: 10px;
}

.atsfx-form-wrapper {
    padding: 0;
    margin-bottom: 0;
}

.atsfx-form-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

/* Form Styles */
.atsfx-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.atsfx-form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.atsfx-label {
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.atsfx-label .required {
    color: #e74c3c;
}

.atsfx-textarea {
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.5;
    resize: vertical;
    min-height: 100px;
    transition: border-color 0.3s ease;
}

.atsfx-textarea:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.atsfx-word-count {
    font-size: 12px;
    color: #666;
    text-align: right;
}

.atsfx-select {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    background-color: #fff;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.atsfx-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Settings Grid */
.atsfx-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

/* Slider Styles */
.atsfx-slider-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.atsfx-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e1e5e9;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.atsfx-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.atsfx-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #007cba;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.atsfx-slider-value {
    min-width: 40px;
    text-align: center;
    font-weight: 600;
    color: #007cba;
    font-size: 14px;
}

/* Input styles */
.atsfx-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.atsfx-input:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

/* Help text styles */
.atsfx-help-text {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* Checkbox Styles */
.atsfx-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.atsfx-checkbox {
    width: 18px;
    height: 18px;
    accent-color: #007cba;
}

.atsfx-checkbox-text {
    font-weight: 500;
    color: #333;
}

.atsfx-description {
    font-size: 12px;
    color: #666;
    margin: 5px 0 0 0;
}

/* Button Styles */
.atsfx-form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 10px;
}

.atsfx-button {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
}

.atsfx-button-primary {
    background: #007cba;
    color: #fff;
}

.atsfx-button-primary:hover {
    background: #005a87;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 124, 186, 0.3);
}

.atsfx-button-secondary {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e1e5e9;
}

.atsfx-button-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}

.atsfx-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.atsfx-spinner {
    width: 16px;
    height: 16px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: atsfx-spin 1s linear infinite;
}

@keyframes atsfx-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Result Container */
.atsfx-result-container {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 30px;
    margin-top: 20px;
}

.atsfx-result-title {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

.atsfx-audio-player {
    margin-bottom: 20px;
}

.atsfx-audio-player audio {
    width: 100%;
    border-radius: 6px;
}

.atsfx-result-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.atsfx-result-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.atsfx-info-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.atsfx-info-item strong {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.atsfx-info-item span {
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

/* Error Container */
.atsfx-error-container {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 15px;
    margin: 20px 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.atsfx-error-message {
    color: #721c24;
    font-weight: 500;
}

.atsfx-error-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #721c24;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.atsfx-error-close:hover {
    color: #491217;
}

/* Voice Preview */
.atsfx-voice-preview {
    margin-top: 10px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
}

/* History Styles */
.atsfx-history-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

.atsfx-history-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}


.atsfx-history-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.atsfx-history-item {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.atsfx-history-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.atsfx-history-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 20px;
}

.atsfx-history-text {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atsfx-history-text-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #333;
}


.atsfx-history-audio {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.atsfx-audio-actions {
    display: flex;
    gap: 10px;
}

.atsfx-download-link {
    padding: 6px 12px;
    background: #f8f9fa;
    color: #333;
    text-decoration: none;
    border-radius: 4px;
    font-size: 12px;
    border: 1px solid #e1e5e9;
    transition: all 0.3s ease;
}

.atsfx-download-link:hover {
    background: #e9ecef;
    color: #333;
}




/* Pagination */
.atsfx-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
}

.atsfx-pagination-link {
    padding: 8px 16px;
    background: #007cba;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.3s ease;
}

.atsfx-pagination-link:hover {
    background: #005a87;
    color: #fff;
}

.atsfx-pagination-info {
    font-size: 14px;
    color: #666;
}


/* No Records */
.atsfx-no-records {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.atsfx-no-records p {
    margin: 10px 0;
    color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
    .atsfx-generator-container {
        padding: 0px;
    }
    
    .atsfx-form-wrapper {
        padding: 0px;
    }
    
    .atsfx-settings-grid {
        grid-template-columns: 1fr;
    }
    
    .atsfx-form-actions {
        flex-direction: column;
    }
    
    .atsfx-button {
        width: 100%;
    }
    
    .atsfx-history-content {
        grid-template-columns: 1fr;
    }
    
    
    .atsfx-pagination {
        flex-direction: column;
        gap: 10px;
    }
    
    .atsfx-modal-content {
        width: 95%;
        margin: 20px;
    }
}

@media (max-width: 480px) {
    .atsfx-form-title {
        font-size: 20px;
    }
    
    .atsfx-result-actions {
        flex-direction: column;
    }
    
    .atsfx-result-info {
        grid-template-columns: 1fr;
    }
    
} 