/* ============================================
   Bootstrap → Tailwind compatibility layer
   For ASP.NET Identity scaffold pages that use
   Bootstrap class names. Add to app.css or
   reference separately in App.razor.
   ============================================ */

/* ---------- Form Controls ---------- */
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: #111827;
    background-color: #fff;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus {
    outline: none;
    border-color: #7c3aed;
    box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.form-control:disabled {
    background-color: #f3f4f6;
    color: #6b7280;
    cursor: not-allowed;
}

/* ---------- Form Floating (Bootstrap 5 style) ---------- */
.form-floating {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating > .form-control {
    padding: 1.625rem 1rem 0.625rem;
}

.form-floating > .form-label {
    position: absolute;
    top: 0;
    left: 0;
    padding: 1rem;
    pointer-events: none;
    transform-origin: 0 0;
    transition: opacity 0.1s ease-in-out, transform 0.1s ease-in-out;
    color: #6b7280;
    font-size: 0.875rem;
}

.form-floating > .form-control:focus ~ .form-label,
.form-floating > .form-control:not(:placeholder-shown) ~ .form-label {
    transform: scale(0.8) translateY(-0.5rem);
    opacity: 0.75;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.25rem;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.15s ease-in-out;
    border: 1px solid transparent;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(to right, #7c3aed, #2563eb);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.4);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-danger {
    background-color: #dc2626;
    color: #fff;
}

.btn-danger:hover {
    background-color: #b91c1c;
}

.btn-secondary {
    background-color: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.btn-secondary:hover {
    background-color: #e5e7eb;
}

.btn-link {
    background: none;
    border: none;
    color: #7c3aed;
    padding: 0;
    font-weight: 500;
    cursor: pointer;
}

.btn-link:hover {
    color: #6d28d9;
    text-decoration: underline;
}

/* ---------- Width helpers ---------- */
.w-100 {
    width: 100%;
}

/* ---------- Grid ---------- */
.row {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}

.col-md-4, .col-md-6, .col-xl-6 {
    flex: 1 1 100%;
}

@media (min-width: 768px) {
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-xl-6 { flex: 0 0 50%; max-width: 50%; }
}

.col-lg-3 {
    flex: 0 0 100%;
}

.col-lg-9 {
    flex: 0 0 100%;
}

@media (min-width: 1024px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
}

/* ---------- Text / Validation ---------- */
.text-danger {
    color: #dc2626;
    font-size: 0.875rem;
}

.text-success {
    color: #16a34a;
}

.text-muted {
    color: #6b7280;
}

/* ---------- Alerts ---------- */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.alert-warning {
    background-color: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
}

.alert-danger {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-success {
    background-color: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* ---------- Navigation (for ManageNavMenu if still used) ---------- */
.nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.nav-pills .nav-link {
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    color: #374151;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.15s ease-in-out;
}

.nav-pills .nav-link:hover {
    background-color: #f3e8ff;
    color: #7c3aed;
}

.nav-pills .nav-link.active {
    background-color: #f3e8ff;
    color: #7c3aed;
    font-weight: 500;
}

/* ---------- Checkboxes ---------- */
.form-check-input {
    width: 1rem;
    height: 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    cursor: pointer;
    accent-color: #7c3aed;
}

/* ---------- Input Group (for email verification icon) ---------- */
.input-group {
    display: flex;
    align-items: stretch;
}

.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group-append,
.input-group-text {
    display: flex;
    align-items: center;
    padding: 0 0.75rem;
    background-color: #f3f4f6;
    border: 1px solid #d1d5db;
    border-left: none;
    border-top-right-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
    font-size: 0.875rem;
}

/* ---------- Headings inside manage pages ---------- */
.bg-white h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
}

.bg-white hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 1rem 0;
}

/* ---------- Lists ---------- */
.list {
    list-style: decimal;
    padding-left: 1.5rem;
    color: #374151;
    font-size: 0.875rem;
    line-height: 1.75;
}

/* ---------- Misc ---------- */
.mb-3 { margin-bottom: 0.75rem; }
.mt-2 { margin-top: 0.5rem; }
.font-weight-bold { font-weight: 700; }

.checkbox {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.checkbox .form-label {
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
}
