/* Form Visibility Fixes - Works with existing themes */

/* Base form controls with theme-aware styling */
.form-control {
    background: #2a2a3e !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--text-color) !important;
    transition: all 0.3s ease;
}

.form-control:focus {
    background: #343448 !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25) !important;
    color: var(--text-color) !important;
    outline: none !important;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.6) !important;
    opacity: 1 !important;
}

/* Select dropdown fixes */
select.form-control option {
    background: #1a1a2e !important;
    color: #ffffff !important;
    padding: 8px 12px;
}

select.form-control option:hover,
select.form-control option:focus,
select.form-control option:checked {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Textarea specific fixes */
textarea.form-control {
    background: #2a2a3e !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--text-color) !important;
    resize: vertical;
}

textarea.form-control:focus {
    background: #343448 !important;
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 0.2rem rgba(0, 212, 255, 0.25) !important;
    color: var(--text-color) !important;
}

/* Form labels */
label {
    color: var(--text-color) !important;
    font-weight: 500;
    margin-bottom: 5px;
    display: block;
}

/* Dropdown menus */
.dropdown-menu {
    background: #2a2a3e !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3) !important;
    z-index: 9999 !important;
}

.dropdown-item {
    color: var(--text-color) !important;
    background: transparent !important;
    padding: 8px 16px;
    border: none;
    width: 100%;
    text-align: left;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: rgba(0, 212, 255, 0.1) !important;
    color: var(--text-color) !important;
    text-decoration: none;
}

/* Button fixes */
.btn {
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 212, 255, 0.3);
    text-decoration: none;
    color: var(--text-color) !important;
}

.btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: white !important;
}

.btn-primary:hover {
    background: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: white !important;
}

.btn-outline {
    background: transparent !important;
    border: 1px solid var(--primary-color) !important;
    color: var(--primary-color) !important;
}

.btn-outline:hover {
    background: var(--primary-color) !important;
    color: white !important;
}

/* Input group fixes */
.input-group .form-control {
    background: #2a2a3e !important;
    border: 1px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--text-color) !important;
}

/* Card and container background fixes */
.card {
    background: #1a1a2e !important;
    border: 1px solid rgba(0, 212, 255, 0.2) !important;
    color: var(--text-color) !important;
}

.card-header {
    background: #2a2a3e !important;
    border-bottom: 1px solid rgba(0, 212, 255, 0.2) !important;
    color: var(--text-color) !important;
}

.card-body {
    background: #1a1a2e !important;
    color: var(--text-color) !important;
}

/* Table fixes */
.table th,
.table td {
    border-color: rgba(0, 212, 255, 0.2) !important;
    color: var(--text-color) !important;
}

.table thead th {
    background: #2a2a3e !important;
    border-bottom: 2px solid rgba(0, 212, 255, 0.3) !important;
    color: var(--text-color) !important;
}

/* Badge fixes */
.badge {
    font-size: 0.75rem;
    padding: 0.35em 0.65em;
    border-radius: 0.25rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Alert fixes */
.alert {
    border: 1px solid;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    background: #2a2a3e;
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1) !important;
    border-color: #dc3545 !important;
    color: #dc3545 !important;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1) !important;
    border-color: #28a745 !important;
    color: #28a745 !important;
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1) !important;
    border-color: #ffc107 !important;
    color: #ffc107 !important;
}

.alert-info {
    background: rgba(23, 162, 184, 0.1) !important;
    border-color: #17a2b8 !important;
    color: #17a2b8 !important;
}

/* Responsive fixes */
@media (max-width: 768px) {
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .dropdown-menu {
        position: static !important;
        float: none !important;
        width: 100% !important;
        margin-top: 0 !important;
        border-radius: 0.25rem !important;
    }
} 