amine_dubs
fix
0148163
/* Global styles */
:root {
--primary-color: #4285F4;
--primary-dark: #3367D6;
--secondary-color: #34A853;
--accent-color: #FBBC05;
--danger-color: #EA4335;
--text-dark: #202124;
--text-light: #5f6368;
--gray-light: #f5f5f5;
--gray-medium: #e8eaed;
--gray-border: #dadce0;
--white: #ffffff;
--rtl-dir: rtl;
--ltr-dir: ltr;
--box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
--border-radius: 8px;
--transition-speed: 0.3s;
--panel-background: #f8f9fa;
}
/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
line-height: 1.6;
color: #333;
background-color: #f9f9f9;
display: flex;
flex-direction: column;
min-height: 100vh;
}
/* Header styles */
header {
background-color: #fff;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
padding: 1rem 2rem;
display: flex;
justify-content: space-between;
align-items: center;
}
.logo {
display: flex;
align-items: center;
flex-direction: column;
}
.logo h1 {
font-size: 2rem;
font-weight: 700;
}
.primary-color {
color: #4285f4;
}
.tagline {
font-size: 0.9rem;
color: #666;
margin-top: -5px;
}
nav ul {
display: flex;
list-style: none;
}
nav ul li {
margin-left: 1.5rem;
position: relative;
}
nav ul li::after {
content: '';
display: block;
width: 0;
height: 3px;
background-color: #4285f4;
position: absolute;
bottom: -10px;
left: 0;
transition: width 0.3s;
}
nav ul li.active::after,
nav ul li:hover::after {
width: 100%;
}
nav a {
color: #333;
text-decoration: none;
font-weight: 500;
font-size: 1rem;
padding: 0.5rem 0;
transition: color 0.3s;
}
nav a:hover,
nav ul li.active a {
color: #4285f4;
}
/* Main content styles */
main {
flex: 1;
padding: 2rem;
max-width: 1200px;
margin: 0 auto;
width: 100%;
}
.translation-section {
width: 100%;
}
.hidden {
display: none;
}
.translation-container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
overflow: hidden;
}
.translation-box {
padding: 1.5rem;
}
/* Language controls */
.language-controls {
display: flex;
align-items: center;
border-bottom: 1px solid #eee;
padding-bottom: 1.5rem;
margin-bottom: 1.5rem;
}
.language-selector {
flex: 1;
}
.lang-select {
width: 100%;
padding: 0.8rem;
border: 1px solid #ddd;
border-radius: 5px;
font-size: 1rem;
background-color: #f9f9f9;
cursor: pointer;
transition: border-color 0.3s, box-shadow 0.3s;
appearance: none;
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23777' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
background-repeat: no-repeat;
background-position: right 0.7rem center;
background-size: 1em;
padding-right: 2.5rem;
}
.lang-select:focus {
outline: none;
border-color: #4285f4;
box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.25);
}
.lang-select option {
font-size: 0.95rem;
padding: 0.5rem;
}
.lang-select option[value="auto"] {
font-weight: bold;
}
.swap-languages {
margin: 0 1.5rem;
}
.swap-languages button {
background-color: #f1f1f1;
border: none;
border-radius: 50%;
width: 40px;
height: 40px;
cursor: pointer;
transition: background-color 0.3s, transform 0.3s;
display: flex;
justify-content: center;
align-items: center;
}
.swap-languages button:hover {
background-color: #e0e0e0;
transform: rotate(180deg);
}
.swap-languages i {
font-size: 1.2rem;
color: #555;
}
/* Translation panels */
.translation-panels {
display: flex;
gap: 2rem;
margin-bottom: 1.5rem;
}
.panel {
flex: 1;
border: 1px solid #eee;
border-radius: 8px;
overflow: hidden;
display: flex;
flex-direction: column;
}
.panel-header {
background-color: #f9f9f9;
padding: 0.8rem;
display: flex;
justify-content: space-between;
align-items: center;
border-bottom: 1px solid #eee;
}
.panel-title {
font-weight: 600;
color: #555;
}
.panel-actions {
display: flex;
}
.icon-button {
background: none;
border: none;
font-size: 1rem;
padding: 0.3rem;
cursor: pointer;
border-radius: 3px;
transition: background-color 0.2s;
color: #777;
}
.icon-button:hover {
background-color: #e0e0e0;
color: #4285f4;
}
textarea#text-input {
resize: none;
border: none;
padding: 1rem;
width: 100%;
height: 200px;
font-family: inherit;
font-size: 1rem;
}
textarea#text-input:focus {
outline: none;
}
#text-result,
.document-content {
padding: 1rem;
height: 200px;
overflow-y: auto;
background-color: #fcfcfc;
flex: 1;
}
.panel-footer {
padding: 0.8rem;
display: flex;
justify-content: space-between;
align-items: center;
background-color: #f9f9f9;
border-top: 1px solid #eee;
}
.char-count {
font-size: 0.85rem;
color: #777;
}
.translate-button {
background-color: #4285f4;
color: white;
border: none;
border-radius: 5px;
padding: 0.6rem 1.2rem;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.3s;
display: flex;
align-items: center;
gap: 0.5rem;
}
.translate-button:hover {
background-color: #3367d6;
}
.translate-button:disabled {
background-color: #b3b3b3;
cursor: not-allowed;
}
/* Active translate button */
.translate-button.active-button {
background-color: #4285f4;
opacity: 1;
}
/* Translate button for documents - default transparent until file is selected */
#doc-translation-form .translate-button {
opacity: 0.6;
background-color: rgba(66, 133, 244, 0.8);
transition: all 0.3s ease;
cursor: not-allowed;
}
#doc-translation-form .translate-button.active-button {
background-color: #4285f4;
opacity: 1;
cursor: pointer;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* Document upload area */
.file-upload-area {
border: 2px dashed #ddd;
border-radius: 10px;
padding: 2.5rem;
text-align: center;
margin: 2rem 0;
transition: border-color 0.3s, background-color 0.3s;
position: relative;
}
.file-upload-area:hover {
background-color: #f9f9f9;
border-color: #4285f4;
}
.file-upload-label {
display: flex;
flex-direction: column;
align-items: center;
cursor: pointer;
}
.file-upload-label i {
font-size: 2.5rem;
color: #4285f4;
margin-bottom: 1rem;
}
.file-types {
font-size: 0.85rem;
color: #777;
margin-top: 0.5rem;
}
input.file-input {
display: none;
}
/* File name display - improved styling */
#file-name-display {
margin-top: 1rem;
padding: 0.7rem 1rem;
background-color: #e8f0fe;
border-radius: 4px;
color: #1a73e8;
font-weight: 500;
display: none;
margin-bottom: 1rem;
border-left: 3px solid #4285f4;
}
.document-result-area {
margin-top: 2rem;
}
.document-panels {
display: none;
}
.document-actions {
display: flex;
justify-content: center;
margin-top: 1rem;
}
.file-info {
font-size: 0.85rem;
color: #777;
}
/* Download button - enhanced styling */
.download-button {
background-color: #34A853;
color: white;
border: none;
border-radius: 5px;
padding: 0.8rem 1.5rem;
font-size: 1rem;
cursor: pointer;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 0.5rem;
margin: 1.5rem auto;
width: fit-content;
min-width: 200px;
box-shadow: 0 2px 5px rgba(0,0,0,0.15);
}
.download-button:hover {
background-color: #2a8a46;
box-shadow: 0 3px 8px rgba(0,0,0,0.2);
transform: translateY(-1px);
}
.download-button i {
font-size: 1.1rem;
}
/* Loading indicator */
.loading-indicator {
display: none;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 2rem;
text-align: center;
color: #555;
}
.spinner {
width: 40px;
height: 40px;
border: 4px solid rgba(66, 133, 244, 0.2);
border-left-color: #4285f4;
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}
/* Notification and error messages */
.notification,
.error-message {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
padding: 0.8rem 1.5rem;
border-radius: 5px;
font-weight: 500;
z-index: 100;
display: none;
opacity: 0;
transition: opacity 0.3s;
max-width: 90%;
}
.notification {
background-color: #4caf50;
color: white;
}
.error-message {
background-color: #f44336;
color: white;
padding: 1rem;
border-radius: 4px;
margin-bottom: 1rem;
text-align: center;
display: none;
box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
/* Show animation for notification */
.notification.show,
.error-message.show {
display: block;
opacity: 1;
animation: fadeIn 0.3s;
}
/* Footer */
footer {
background-color: #333;
color: #fff;
padding: 1.5rem;
text-align: center;
}
.footer-content p {
font-size: 0.9rem;
opacity: 0.8;
}
/* Debug info */
.debug-info {
background-color: #ffe082;
color: #333;
padding: 1rem;
margin: 1rem 0;
border-radius: 5px;
font-family: monospace;
display: none;
}
/* Quick phrases styles */
.quick-phrases-container {
margin-top: 1.5rem;
border-top: 1px solid #eee;
padding-top: 1.5rem;
}
.quick-phrases {
margin-bottom: 1.5rem;
background-color: var(--panel-background);
border-radius: var(--border-radius);
padding: 1rem;
border: 1px solid var(--gray-border);
}
.quick-phrases h3 {
margin-bottom: 0.8rem;
color: var(--text-dark);
font-size: 0.95rem;
font-weight: 600;
}
.phrases-container {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.phrase-btn {
background-color: var(--white);
border: 1px solid var(--gray-border);
border-radius: 20px;
padding: 0.4rem 0.8rem;
font-size: 0.85rem;
cursor: pointer;
transition: all var(--transition-speed);
}
.phrase-btn:hover {
background-color: var(--primary-color);
color: var(--white);
border-color: var(--primary-color);
}
.phrase-btn.ar {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
/* Auto-detect language badge */
.detected-language {
display: inline-block;
background-color: #e8f0fe;
color: #1a73e8;
padding: 0.2rem 0.5rem;
border-radius: 3px;
font-size: 0.8rem;
margin-left: 0.5rem;
font-weight: normal;
}
/* RTL support for text areas and panels */
[dir="rtl"] {
text-align: right;
}
/* Responsive design */
@media (max-width: 768px) {
.translation-panels {
flex-direction: column;
}
header {
flex-direction: column;
padding: 1rem;
}
nav ul li {
margin-left: 1rem;
margin-top: 0.5rem;
}
.language-controls {
flex-direction: column;
gap: 1rem;
flex-wrap: wrap;
}
.language-selector {
flex-basis: 100%;
}
.swap-languages {
margin: 0 auto;
}
.translation-box {
padding: 1rem;
}
.file-upload-area {
padding: 1.5rem;
}
}
/* Animation for loading and transitions */
@keyframes fadeIn {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
.translated-text {
animation: fadeIn 0.4s ease-in-out;
}