Files
marketplaces/src/app/components/language-selector/language-selector.component.scss

259 lines
4.4 KiB
SCSS
Raw Normal View History

2026-01-18 18:57:06 +04:00
.language-selector {
position: relative;
display: inline-block;
}
.language-button {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 12px;
background: transparent;
border: 1px solid rgba(255, 255, 255, 0.2);
border-radius: 8px;
color: #ffffff;
cursor: pointer;
transition: all 0.3s ease;
font-size: 14px;
font-weight: 500;
&:hover {
background: rgba(255, 255, 255, 0.05);
border-color: rgba(255, 255, 255, 0.3);
}
.language-flag {
width: 20px;
height: 20px;
display: inline-block;
border-radius: 2px;
}
.language-code {
text-transform: uppercase;
letter-spacing: 0.5px;
}
.dropdown-arrow {
transition: transform 0.3s ease;
opacity: 0.7;
&.rotated {
transform: rotate(180deg);
}
}
}
.language-dropdown {
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 180px;
background: var(--card-bg, #1a1a1a);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 12px;
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
opacity: 0;
visibility: hidden;
transform: translateY(-10px);
transition: all 0.3s ease;
z-index: 1000;
overflow: hidden;
&.open {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
}
.language-option {
display: flex;
align-items: center;
gap: 10px;
width: 100%;
padding: 12px 16px;
background: transparent;
border: none;
color: #ffffff;
cursor: pointer;
transition: background 0.2s ease;
font-size: 14px;
text-align: left;
&:hover:not(.disabled) {
background: rgba(255, 255, 255, 0.05);
}
&.active {
background: rgba(255, 255, 255, 0.1);
font-weight: 600;
}
&.disabled {
opacity: 0.5;
cursor: not-allowed;
position: relative;
}
.option-flag {
width: 24px;
height: 24px;
display: inline-block;
border-radius: 3px;
}
.option-name {
flex: 1;
}
}
// Light theme adjustments
:host-context(.novo-header),
:host-context(.header) {
.language-button {
border-color: rgba(0, 0, 0, 0.2);
color: #333333;
&:hover {
background: rgba(0, 0, 0, 0.05);
border-color: rgba(0, 0, 0, 0.3);
}
}
}
:host-context(.light-theme) {
.language-button {
border-color: rgba(0, 0, 0, 0.2);
color: #333333;
&:hover {
background: rgba(0, 0, 0, 0.05);
border-color: rgba(0, 0, 0, 0.3);
}
}
.language-dropdown {
background: #ffffff;
border-color: rgba(0, 0, 0, 0.1);
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}
.language-option {
color: #333333;
&:hover:not(.disabled) {
background: rgba(0, 0, 0, 0.05);
}
&.active {
background: rgba(0, 0, 0, 0.1);
}
}
}
2026-02-14 00:45:17 +04:00
// Dexar header specific styles
:host-context(.dexar-header) {
.language-selector {
width: 67px;
height: 32px;
}
.language-button {
width: 100%;
height: 100%;
padding: 6px;
gap: 8px;
background: rgba(255, 255, 255, 0.3);
border: 1px solid #677b78;
border-radius: 12px;
color: #1e3c38;
justify-content: center;
&:hover {
background: rgba(255, 255, 255, 0.5);
border-color: #677b78;
}
.language-flag {
display: none;
}
.language-code {
font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
font-weight: 500;
font-size: 24px;
color: #1e3c38;
letter-spacing: 0;
line-height: 1;
}
.dropdown-arrow {
display: block;
width: 9px;
height: 14px;
opacity: 1;
path {
stroke: #1e3c38;
}
}
}
.language-dropdown {
background: #ffffff;
border-color: #d3dad9;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.language-option {
color: #1e3c38;
&:hover:not(.disabled) {
background: rgba(161, 180, 181, 0.2);
}
&.active {
background: rgba(73, 118, 113, 0.1);
}
}
}
2026-01-18 18:57:06 +04:00
// Mobile responsiveness
@media (max-width: 768px) {
.language-button {
padding: 6px 10px;
font-size: 13px;
.language-flag {
width: 18px;
height: 18px;
}
}
.language-dropdown {
min-width: 160px;
}
.language-option {
padding: 10px 14px;
font-size: 13px;
.option-flag {
width: 20px;
height: 20px;
}
}
2026-02-14 00:45:17 +04:00
:host-context(.dexar-header) {
.language-selector {
width: 56px;
height: 28px;
}
.language-button .language-code {
font-size: 18px;
}
}
2026-01-18 18:57:06 +04:00
}