/**
 * Translation Component CSS
 * This file contains all the styling for the translation modal component
 */

/* Translation Modal Styles */
#translation_modal .modal-dialog {
    max-width: 90%;
    margin: 1.75rem auto;
}

#translation_modal .modal-content {
    border-radius: 0.5rem;
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#translation_modal .modal-header {
    border-bottom: 1px solid #e9ecef;
    background-color: #f8f9fa;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
}

#translation_modal .modal-title {
    font-weight: 600;
    color: #343a40;
}

#translation_modal .modal-body {
    padding: 1.5rem;
}

/* Image Section Styles */
.car-image-section {
    position: relative;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.car-image-container {
    position: relative;
    overflow: hidden;
    height: 300px;
    background-color: #f8f9fa;
}

.car-image-container .carousel-item {
    height: 300px;
    text-align: center;
}

.car-image-container .carousel-item img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: transform 0.2s ease;
    transform-origin: center;
}

/* Zoom Controls */
.zoom-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    z-index: 10;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 0.25rem;
    padding: 0.25rem;
    display: flex;
}

.zoom-controls button {
    background-color: transparent;
    border: none;
    color: #495057;
    font-size: 1rem;
    padding: 0.25rem 0.5rem;
    cursor: pointer;
    transition: color 0.2s ease;
}

.zoom-controls button:hover {
    color: #007bff;
}

.zoom-controls button:focus {
    outline: none;
}

/* Translation Form Styles */
.translation-form {
    margin-bottom: 1.5rem;
}

.language-selector {
    margin-bottom: 1rem;
}

.language-selector label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: block;
}

.language-selector select {
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.language-selector select:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Translation Button Styles */
.translation-btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    cursor: pointer;
    width: 100%;
}

.btn-ai {
    color: #fff;
    background-color: #6f42c1;
    border-color: #6f42c1;
}

.btn-ai:hover {
    color: #fff;
    background-color: #5e35b1;
    border-color: #5e35b1;
}

.btn-ai:focus {
    box-shadow: 0 0 0 0.2rem rgba(111, 66, 193, 0.5);
}

.btn-ai .loading-state {
    display: none;
}

/* Preview Section Styles */
.preview-section {
    margin-bottom: 1.5rem;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    background-color: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

.preview-title {
    font-weight: 600;
    margin: 0;
    color: #343a40;
}

.preview-toggle {
    background-color: transparent;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 0.25rem;
    font-size: 0.875rem;
}

.preview-toggle:hover {
    color: #007bff;
}

.preview-toggle:focus {
    outline: none;
}

.preview-content {
    padding: 1rem;
    background-color: #fff;
    max-height: 300px;
    overflow-y: auto;
}

.preview-content.expanded {
    max-height: none;
}

/* Translation Output Styles */
.translation-output {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: #212529;
}

.translation-output h1,
.translation-output h2,
.translation-output h3,
.translation-output h4,
.translation-output h5,
.translation-output h6 {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.2;
}

.translation-output h1 {
    font-size: 1.75rem;
}

.translation-output h2 {
    font-size: 1.5rem;
}

.translation-output h3 {
    font-size: 1.25rem;
}

.translation-output p {
    margin-top: 0;
    margin-bottom: 1rem;
}

.translation-output ul,
.translation-output ol {
    margin-top: 0;
    margin-bottom: 1rem;
    padding-left: 2rem;
}

.translation-output li {
    margin-bottom: 0.5rem;
}

.translation-output table {
    width: 100%;
    margin-bottom: 1rem;
    color: #212529;
    border-collapse: collapse;
}

.translation-output table th,
.translation-output table td {
    padding: 0.75rem;
    vertical-align: top;
    border-top: 1px solid #dee2e6;
}

.translation-output table thead th {
    vertical-align: bottom;
    border-bottom: 2px solid #dee2e6;
}

.translation-output pre {
    display: block;
    font-size: 87.5%;
    color: #212529;
    background-color: #f8f9fa;
    padding: 1rem;
    margin-bottom: 1rem;
    overflow: auto;
    border-radius: 0.25rem;
}

.translation-output code {
    font-size: 87.5%;
    color: #e83e8c;
    word-break: break-word;
}

/* Responsive Styles */
@media (max-width: 767.98px) {
    #translation_modal .modal-dialog {
        max-width: 95%;
        margin: 0.5rem auto;
    }
    
    .car-image-container {
        height: 200px;
    }
    
    .car-image-container .carousel-item {
        height: 200px;
    }
    
    .preview-content {
        max-height: 200px;
    }
}

@media (min-width: 992px) {
    .car-image-container {
        height: 400px;
    }
    
    .car-image-container .carousel-item {
        height: 400px;
    }
} 