/* ============================================================
   FORMS – Kazuma Ali Portfolio
   ============================================================ */

form {
    width: 100%;
}
select {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    width: 100%;
    max-width: 100%;
}
input,
textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(78, 205, 196, 0.15);
    border-radius: var(--radius-sm);
    padding: 0.7rem 1rem;
    color: #eaf4f0 !important;
    font-size: 0.95rem;
    font-family: inherit;
    transition: all var(--transition);
    width: 100%;
    max-width: 100%;
}

select:not([multiple]) option:checked {
    background: #ffffff !important;
    color: #0a1e28 !important;
}

select[multiple] option:checked {
    background: #ffffff !important;
    color: #0a1e28 !important;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #4ecdc4;
    box-shadow: 0 0 0 3px rgba(78, 205, 196, 0.15), 0 0 20px rgba(78, 205, 196, 0.05);
    background: rgba(255, 255, 255, 0.06);
}
input::placeholder,
textarea::placeholder {
    color: #eaf4f0 !important;
    opacity: 0.7;
}
input:-webkit-autofill,
input:-webkit-autofill:focus {
    -webkit-text-fill-color: #eaf4f0 !important;
    -webkit-box-shadow: 0 0 0 1000px rgba(10, 30, 40, 0.95) inset !important;
    caret-color: #eaf4f0;
}
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%237ea8a3' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
    color: #eaf4f0 !important;
}
[dir="rtl"] select {
    background-position: left 1rem center;
    padding-right: 1rem;
    padding-left: 2.5rem;
}

select option {
    background: #0a1e28;
    color: #eaf4f0;
}

select option:checked,
select option[selected] {
    background: #ffffff !important;
    color: #0a1e28 !important;
}

select option:hover {
    background: rgba(78, 205, 196, 0.35) !important;
    color: #0a1e28 !important;
}

/* ============================================================
   TOGGLE SWITCH – Kazuma Ali Portfolio
   ============================================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 34px;
    transition: background 0.3s, box-shadow 0.3s;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch .slider::before {
    content: "";
    position: absolute;
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.toggle-switch input:checked + .slider {
    background: linear-gradient(135deg, #2b9b8a, #4ecdc4);
    box-shadow: 0 0 20px rgba(78, 205, 196, 0.3);
}

.toggle-switch input:checked + .slider::before {
    transform: translateX(24px);
}

/* RTL support */
[dir="rtl"] .toggle-switch .slider::before {
    left: auto;
    right: 4px;
}
[dir="rtl"] .toggle-switch input:checked + .slider::before {
    transform: translateX(-24px);
}