/**
 * Translate Component Styles
 * Styling for the Translation tab content
 */

.translate-tab-content {
    min-height: 400px;
}

/* Translate Container */
.translate-container {
    padding: 20px 0;
}

.translate-header {
    margin-bottom: 32px;
    text-align: center;
}

.translate-header h2 {
    margin: 0 0 8px 0;
    font-size: 28px;
    color: #fff;
}

.translate-subtitle {
    margin: 0;
    color: rgba(255, 255, 255, 0.7);
    font-size: 16px;
}

/* Translate Form */
.translate-form {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 24px;
}

.translate-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 24px;
}

.translate-option-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.translate-option-group label {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 600;
}

.translate-select {
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.translate-select:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.4);
}

.translate-select:focus {
    outline: none;
    border-color: var(--primary-salmon, #ff5757);
    box-shadow: 0 0 0 3px rgba(255, 87, 87, 0.1);
}

.translate-select option {
    background: #1a1a1a;
    color: #fff;
}

/* Translate Button */
.translate-button {
    width: 100%;
    padding: 14px 24px;
    background: var(--primary-salmon, #ff5757);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.translate-button:hover:not(:disabled) {
    background: #ff3d3d;
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(255, 87, 87, 0.3);
}

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

.translate-button svg {
    width: 20px;
    height: 20px;
}

/* Loading Spinner (small) */
.loading-spinner.small {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Translation Result */
.translation-result {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.5s ease forwards;
}

.translation-result.hidden {
    display: none;
}

.translation-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.translation-result-header h3 {
    margin: 0;
    font-size: 20px;
    color: #fff;
}

.copy-button {
    padding: 8px 16px;
    background: rgba(255, 165, 0, 0.15);
    color: var(--secondary-orange, #ffa500);
    border: 1px solid var(--secondary-orange, #ffa500);
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.copy-button:hover {
    background: var(--secondary-orange, #ffa500);
    color: white;
    transform: translateY(-1px);
}

.copy-button svg {
    width: 18px;
    height: 18px;
}

/* Translation Content */
.translation-content {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.8;
    font-size: 16px;
}

.translation-content h1,
.translation-content h2,
.translation-content h3,
.translation-content h4 {
    color: #fff;
    margin-top: 24px;
    margin-bottom: 12px;
}

.translation-content h1 {
    font-size: 28px;
}

.translation-content h2 {
    font-size: 24px;
}

.translation-content h3 {
    font-size: 20px;
}

.translation-content h4 {
    font-size: 18px;
}

.translation-content p {
    margin-bottom: 16px;
}

.translation-content ul,
.translation-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.translation-content li {
    margin-bottom: 8px;
}

.translation-content code {
    background: rgba(255, 255, 255, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
}

.translation-content pre {
    background: rgba(0, 0, 0, 0.3);
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    margin-bottom: 16px;
}

.translation-content pre code {
    background: none;
    padding: 0;
}

/* Transcript Translation Specific */
.transcript-translation pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-size: 15px;
    line-height: 1.6;
}

/* Error State */
.translate-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.translate-error svg {
    color: var(--primary-salmon, #ff5757);
    margin-bottom: 20px;
}

.translate-error h3 {
    margin: 0 0 10px 0;
    color: #fff;
    font-size: 20px;
}

.translate-error p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0 0 20px 0;
}

.translate-error .retry-button {
    padding: 10px 24px;
    background: var(--primary-salmon, #ff5757);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.translate-error .retry-button:hover {
    background: #ff3d3d;
    transform: translateY(-2px);
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile Responsiveness */
@media only screen and (max-width: 768px) {
    .translate-container {
        padding: 10px 0;
    }

    .translate-header h2 {
        font-size: 24px;
    }

    .translate-subtitle {
        font-size: 14px;
    }

    .translate-form {
        padding: 20px;
    }

    .translate-options {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .translate-button {
        padding: 12px 20px;
        font-size: 15px;
    }

    .translation-result {
        padding: 16px;
    }

    .translation-result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .copy-button {
        align-self: flex-end;
    }

    .translation-content {
        font-size: 15px;
    }
}

/* Tablet */
@media only screen and (min-width: 769px) and (max-width: 1024px) {
    .translate-container {
        padding: 15px 0;
    }

    .translate-header h2 {
        font-size: 26px;
    }

    .translate-form {
        padding: 24px;
    }
}
