/* Custom Select Input Styles */

/* Language Icon SVG */
.language-icon {
    width: 20px;
    height: 20px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

.language-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Base styling for all custom selects */
.custom-select-base {
    position: relative;
    display: block;
    width: 100%;
}

.custom-select-base select {
    width: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* Classic Style Select */
.select-classic {
    position: relative;
    display: block;
    width: 100%;
}

.select-classic select {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-classic select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-classic select:hover {
    border-color: #667eea;
}

.select-classic::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-classic:hover::after {
    border-top-color: #667eea;
}

.select-classic select:focus + .select-classic::after,
.select-classic:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #667eea;
}

/* Modern Style Select */
.select-modern {
    position: relative;
    display: block;
    width: 100%;
}

.select-modern select {
    width: 100%;
    padding: 18px 24px;
    padding-right: 55px;
    border: none;
    border-radius: 16px;
    background: #f8f9fa;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-modern select:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.select-modern select:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.select-modern::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, transparent 40%, #666 40%, #666 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #666 40%, #666 60%, transparent 60%);
    background-size: 6px 6px;
    background-position: right 3px top 2px, right 3px bottom 2px;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-modern:hover::after {
    background: linear-gradient(45deg, transparent 40%, #667eea 40%, #667eea 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #667eea 40%, #667eea 60%, transparent 60%);
    background-size: 6px 6px;
    background-position: right 3px top 2px, right 3px bottom 2px;
    background-repeat: no-repeat;
}

/* Minimal Style Select */
.select-minimal {
    position: relative;
    display: block;
    width: 100%;
}

.select-minimal select {
    width: 100%;
    padding: 16px 0;
    padding-right: 30px;
    border: none;
    border-bottom: 2px solid #e1e5e9;
    background: transparent;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-minimal select:focus {
    outline: none;
    border-bottom-color: #667eea;
}

.select-minimal select:hover {
    border-bottom-color: #667eea;
}

.select-minimal::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-minimal:hover::after {
    color: #667eea;
}

/* Gradient Style Select */
.select-gradient {
    position: relative;
    display: block;
    width: 100%;
}

.select-gradient select {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    border: none;
    border-radius: 12px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-gradient select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.3);
    transform: translateY(-2px);
}

.select-gradient select:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.select-gradient::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid white;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-gradient select:focus + .select-gradient::after,
.select-gradient:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
}

/* Outlined Style Select */
.select-outlined {
    position: relative;
    display: block;
    width: 100%;
}

.select-outlined select {
    width: 100%;
    padding: 16px 20px;
    padding-right: 50px;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: transparent;
    color: #667eea;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-outlined select:focus {
    outline: none;
    background: #667eea;
    color: white;
}

.select-outlined select:hover {
    background: rgba(102, 126, 234, 0.1);
}

.select-outlined::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #667eea;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-outlined select:focus + .select-outlined::after,
.select-outlined:focus-within::after {
    border-top-color: white;
    transform: translateY(-50%) rotate(180deg);
}

/* Responsive Design */
@media (max-width: 480px) {
    .select-classic select,
    .select-modern select,
    .select-minimal select,
    .select-gradient select,
    .select-outlined select {
        font-size: 14px;
        padding: 14px 16px;
    }

    .select-modern select {
        padding-right: 45px;
    }

    .select-classic select,
    .select-gradient select,
    .select-outlined select {
        padding-right: 40px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .select-classic select {
        background: #2d3748;
        border-color: #4a5568;
        color: white;
    }

    .select-modern select {
        background: #2d3748;
        color: white;
    }

    .select-minimal select {
        background: transparent;
        color: white;
        border-bottom-color: #4a5568;
    }

    .select-outlined select {
        color: #90cdf4;
        border-color: #90cdf4;
    }

    .select-outlined select:focus {
        background: #90cdf4;
        color: #1a202c;
    }

    .select-outlined::after {
        border-top-color: #90cdf4;
    }

    .select-outlined select:focus + .select-outlined::after,
    .select-outlined:focus-within::after {
        border-top-color: #1a202c;
    }
}

/* Language Select Variants with Icons */

/* Classic Language Select */
.select-classic-lang {
    position: relative;
    display: block;
    width: 100%;
}

.select-classic-lang select {
    width: 100%;
    padding: 16px 20px;
    padding-left: 50px;
    padding-right: 50px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    background: white;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-classic-lang select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.select-classic-lang select:hover {
    border-color: #667eea;
}

.select-classic-lang::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 20px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 8l6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-classic-lang:hover::before {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 8l6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></svg>');
}

.select-classic-lang::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 8px solid #666;
    pointer-events: none;
    transition: transform 0.3s ease;
}

.select-classic-lang:hover::after {
    border-top-color: #667eea;
}

.select-classic-lang select:focus + .select-classic-lang::after,
.select-classic-lang:focus-within::after {
    transform: translateY(-50%) rotate(180deg);
    border-top-color: #667eea;
}

/* Modern Language Select */
.select-modern-lang {
    position: relative;
    display: block;
    width: 100%;
}

.select-modern-lang select {
    width: 100%;
    padding: 18px 24px;
    padding-left: 55px;
    padding-right: 55px;
    border: none;
    border-radius: 16px;
    background: #f8f9fa;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-modern-lang select:focus {
    outline: none;
    background: white;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.select-modern-lang select:hover {
    background: white;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.select-modern-lang::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 24px;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-modern-lang:hover::before {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20"/><path d="M2 12h20"/></svg>');
}

.select-modern-lang::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 24px;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background: linear-gradient(45deg, transparent 40%, #666 40%, #666 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #666 40%, #666 60%, transparent 60%);
    background-size: 6px 6px;
    background-position: right 3px top 2px, right 3px bottom 2px;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-modern-lang:hover::after {
    background: linear-gradient(45deg, transparent 40%, #667eea 40%, #667eea 60%, transparent 60%),
        linear-gradient(-45deg, transparent 40%, #667eea 40%, #667eea 60%, transparent 60%);
    background-size: 6px 6px;
    background-position: right 3px top 2px, right 3px bottom 2px;
    background-repeat: no-repeat;
}

/* Minimal Language Select */
.select-minimal-lang {
    position: relative;
    display: block;
    width: 100%;
}

.select-minimal-lang select {
    width: 100%;
    padding: 16px 0;
    padding-left: 35px;
    padding-right: 30px;
    border: none;
    border-bottom: 2px solid #e1e5e9;
    background: transparent;
    font-size: 16px;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.select-minimal-lang select:focus {
    outline: none;
    border-bottom-color: #667eea;
}

.select-minimal-lang select:hover {
    border-bottom-color: #667eea;
}

.select-minimal-lang::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23666" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 8l6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-minimal-lang:hover::before {
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23667eea" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M5 8l6 6"/><path d="m4 14 6-6 2-3"/><path d="M2 5h12"/><path d="M7 2h1"/><path d="m22 22-5-10-5 10"/><path d="M14 18h6"/></svg>');
}

.select-minimal-lang::after {
    content: '▼';
    position: absolute;
    top: 50%;
    right: 0;
    transform: translateY(-50%);
    color: #666;
    font-size: 12px;
    pointer-events: none;
    transition: all 0.3s ease;
}

.select-minimal-lang:hover::after {
    color: #667eea;
}

/* Label styling */
.select-label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
    font-size: 14px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

@media (prefers-color-scheme: dark) {
    .select-label {
        color: #cbd5e0;
    }
}

