/**
 * Profile Dark Theme Styles
 * Place this file in: public/css/profile-dark-theme.css
 * Include in app.blade.php: <link rel="stylesheet" href="{{ asset('css/profile-dark-theme.css') }}">
 */

/* ============================================================
   TEXT COLORS - Fix visibility issues
   ============================================================ */

/* Make text-muted visible on dark background */
.text-muted {
    color: #8b949e !important;
}

/* Make small text visible */
small.text-muted {
    color: #8b949e !important;
}

/* Form text (help text) */
.form-text {
    color: #8b949e !important;
}

/* Ensure all text is readable */
body {
    color: #c9d1d9;
}

/* ============================================================
   CARD STYLES - Match dark theme
   ============================================================ */

.card {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.card-header {
    background-color: #1c2128 !important;
    border-bottom: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.card-body {
    background-color: #161b22 !important;
    color: #c9d1d9 !important;
}

.card-footer {
    background-color: #1c2128 !important;
    border-top: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

/* Card titles */
.card-title {
    color: #c9d1d9 !important;
}

/* Card text */
.card-text {
    color: #8b949e !important;
}

/* ============================================================
   FORM ELEMENTS - Dark theme
   ============================================================ */

.form-control,
.form-select {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.form-control:focus,
.form-select:focus {
    background-color: #161b22 !important;
    border-color: #58a6ff !important;
    color: #c9d1d9 !important;
    box-shadow: 0 0 0 0.25rem rgba(88, 166, 255, 0.25) !important;
}

.form-control::placeholder {
    color: #6e7681 !important;
}

.form-control:disabled,
.form-select:disabled {
    background-color: #0d1117 !important;
    color: #6e7681 !important;
}

/* Form labels */
.form-label {
    color: #c9d1d9 !important;
    font-weight: 500;
}

/* Form check (checkboxes, radios) */
.form-check-label {
    color: #c9d1d9 !important;
}

.form-check-input {
    background-color: #161b22 !important;
    border-color: #30363d !important;
}

.form-check-input:checked {
    background-color: #58a6ff !important;
    border-color: #58a6ff !important;
}

.form-check-input:focus {
    border-color: #58a6ff !important;
    box-shadow: 0 0 0 0.25rem rgba(88, 166, 255, 0.25) !important;
}

/* Form switch */
.form-switch .form-check-input {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%238b949e'/%3e%3c/svg%3e") !important;
}

.form-switch .form-check-input:checked {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='-4 -4 8 8'%3e%3ccircle r='3' fill='%23fff'/%3e%3c/svg%3e") !important;
}

/* ============================================================
   BUTTONS - Enhanced visibility
   ============================================================ */

.btn-primary {
    background-color: #238636 !important;
    border-color: #238636 !important;
    color: #ffffff !important;
}

.btn-primary:hover {
    background-color: #2ea043 !important;
    border-color: #2ea043 !important;
}

.btn-secondary {
    background-color: #21262d !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

.btn-secondary:hover {
    background-color: #30363d !important;
    border-color: #484f58 !important;
    color: #c9d1d9 !important;
}

.btn-outline-primary {
    color: #58a6ff !important;
    border-color: #58a6ff !important;
}

.btn-outline-primary:hover {
    background-color: #58a6ff !important;
    color: #ffffff !important;
}

.btn-outline-secondary {
    color: #8b949e !important;
    border-color: #30363d !important;
}

.btn-outline-secondary:hover {
    background-color: #30363d !important;
    color: #c9d1d9 !important;
}

/* ============================================================
   ALERTS - Improved contrast
   ============================================================ */

.alert {
    border: 1px solid transparent;
}

.alert-success {
    background-color: #1b4d2d !important;
    border-color: #238636 !important;
    color: #7ee787 !important;
}

.alert-info {
    background-color: #1a3a52 !important;
    border-color: #388bfd !important;
    color: #79c0ff !important;
}

.alert-warning {
    background-color: #4d3d1a !important;
    border-color: #9e6a03 !important;
    color: #f0b72f !important;
}

.alert-danger {
    background-color: #4d1a1a !important;
    border-color: #da3633 !important;
    color: #ff7b72 !important;
}

.alert-dismissible .btn-close {
    filter: brightness(0) invert(1);
}

/* ============================================================
   BADGES - Better visibility
   ============================================================ */

.badge {
    font-weight: 500;
}

.badge.bg-primary {
    background-color: #58a6ff !important;
    color: #0d1117 !important;
}

.badge.bg-secondary {
    background-color: #6e7681 !important;
    color: #ffffff !important;
}

.badge.bg-success {
    background-color: #238636 !important;
    color: #ffffff !important;
}

.badge.bg-info {
    background-color: #388bfd !important;
    color: #ffffff !important;
}

.badge.bg-warning {
    background-color: #9e6a03 !important;
    color: #ffffff !important;
}

.badge.bg-danger {
    background-color: #da3633 !important;
    color: #ffffff !important;
}

/* ============================================================
   TABLES - Dark theme
   ============================================================ */

.table {
    color: #c9d1d9 !important;
    border-color: #30363d !important;
}

.table thead th {
    background-color: #161b22 !important;
    border-color: #30363d !important;
    color: #c9d1d9 !important;
}

.table tbody tr {
    border-color: #30363d !important;
}

.table tbody tr:hover {
    background-color: #1c2128 !important;
}

.table-hover tbody tr:hover {
    background-color: #1c2128 !important;
    color: #c9d1d9 !important;
}

/* ============================================================
   PROGRESS BARS
   ============================================================ */

.progress {
    background-color: #21262d !important;
}

.progress-bar {
    background-color: #238636 !important;
}

.progress-bar.bg-info {
    background-color: #388bfd !important;
}

.progress-bar.bg-warning {
    background-color: #9e6a03 !important;
}

.progress-bar.bg-danger {
    background-color: #da3633 !important;
}

/* ============================================================
   LIST GROUPS - Dark theme
   ============================================================ */

.list-group {
    background-color: transparent !important;
}

.list-group-item {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.list-group-item:hover {
    background-color: #1c2128 !important;
}

.list-group-item.active {
    background-color: #58a6ff !important;
    border-color: #58a6ff !important;
    color: #ffffff !important;
}

.list-group-item-action:hover {
    background-color: #1c2128 !important;
    color: #c9d1d9 !important;
}

/* ============================================================
   MODALS - Dark theme
   ============================================================ */

.modal-content {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
}

.modal-header {
    background-color: #1c2128 !important;
    border-bottom: 1px solid #30363d !important;
    color: #c9d1d9 !important;
}

.modal-title {
    color: #c9d1d9 !important;
}

.modal-body {
    color: #c9d1d9 !important;
}

.modal-footer {
    background-color: #1c2128 !important;
    border-top: 1px solid #30363d !important;
}

.btn-close {
    filter: brightness(0) invert(1);
}

/* ============================================================
   DROPDOWN MENUS - Dark theme
   ============================================================ */

.dropdown-menu {
    background-color: #161b22 !important;
    border: 1px solid #30363d !important;
}

.dropdown-item {
    color: #c9d1d9 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #1c2128 !important;
    color: #58a6ff !important;
}

.dropdown-divider {
    border-top: 1px solid #30363d !important;
}

/* ============================================================
   NAV PILLS/TABS - Dark theme
   ============================================================ */

.nav-pills .nav-link {
    color: #8b949e !important;
}

.nav-pills .nav-link:hover {
    background-color: #21262d !important;
    color: #c9d1d9 !important;
}

.nav-pills .nav-link.active {
    background-color: #238636 !important;
    color: #ffffff !important;
}

.nav-tabs {
    border-bottom: 1px solid #30363d !important;
}

.nav-tabs .nav-link {
    color: #8b949e !important;
    border: 1px solid transparent !important;
}

.nav-tabs .nav-link:hover {
    border-color: #30363d #30363d #30363d !important;
    color: #c9d1d9 !important;
}

.nav-tabs .nav-link.active {
    background-color: #161b22 !important;
    border-color: #30363d #30363d transparent !important;
    color: #c9d1d9 !important;
}

/* ============================================================
   BORDERS
   ============================================================ */

.border {
    border-color: #30363d !important;
}

.border-top {
    border-top-color: #30363d !important;
}

.border-bottom {
    border-bottom-color: #30363d !important;
}

.border-start {
    border-left-color: #30363d !important;
}

.border-end {
    border-right-color: #30363d !important;
}

/* ============================================================
   BACKGROUNDS
   ============================================================ */

.bg-light {
    background-color: #161b22 !important;
    color: #c9d1d9 !important;
}

.bg-dark {
    background-color: #0d1117 !important;
}

/* ============================================================
   ACCORDION - Dark theme
   ============================================================ */

.accordion {
    --bs-accordion-bg: #161b22;
    --bs-accordion-border-color: #30363d;
    --bs-accordion-color: #c9d1d9;
    --bs-accordion-btn-bg: #1c2128;
    --bs-accordion-btn-color: #c9d1d9;
    --bs-accordion-active-bg: #1c2128;
    --bs-accordion-active-color: #58a6ff;
}

.accordion-button:not(.collapsed) {
    background-color: #1c2128 !important;
    color: #58a6ff !important;
}

.accordion-button::after {
    filter: brightness(0) invert(1);
}

/* ============================================================
   PROFILE SPECIFIC STYLES
   ============================================================ */

/* Stats cards hover effect */
.card:hover {
    transform: translateY(-2px);
    border-color: #58a6ff !important;
    box-shadow: 0 4px 15px rgba(88, 166, 255, 0.2);
}

/* Profile avatar preview */
#avatarPreview {
    border: 2px solid #30363d;
}

/* Activity timeline items */
.activity-item {
    border-bottom: 1px solid #21262d !important;
}

.activity-item:last-child {
    border-bottom: none !important;
}

/* Badge unlock animations */
@keyframes badgeUnlock {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.badge-unlocked {
    animation: badgeUnlock 0.3s ease;
}

/* Profile completion progress */
.progress-bar-animated {
    background-image: linear-gradient(
        45deg,
        rgba(255, 255, 255, 0.15) 25%,
        transparent 25%,
        transparent 50%,
        rgba(255, 255, 255, 0.15) 50%,
        rgba(255, 255, 255, 0.15) 75%,
        transparent 75%,
        transparent
    );
    background-size: 1rem 1rem;
}

/* ============================================================
   UTILITY CLASSES
   ============================================================ */

/* Text colors with good contrast */
.text-primary {
    color: #58a6ff !important;
}

.text-success {
    color: #56d364 !important;
}

.text-info {
    color: #79c0ff !important;
}

.text-warning {
    color: #f0b72f !important;
}

.text-danger {
    color: #ff7b72 !important;
}

.text-white-50 {
    color: rgba(201, 209, 217, 0.5) !important;
}

/* Link colors */
a {
    color: #58a6ff;
    text-decoration: none;
}

a:hover {
    color: #79c0ff;
    text-decoration: underline;
}

/* Hover effects for better UX */
.hover-bg-light:hover {
    background-color: #1c2128 !important;
    transition: background-color 0.2s ease;
}

/* ============================================================
   RESPONSIVE ADJUSTMENTS
   ============================================================ */

@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }
    
    .nav-pills {
        flex-direction: column !important;
    }
    
    .nav-pills .nav-link {
        margin-bottom: 0.5rem;
    }
}

/* ============================================================
   PRINT STYLES
   ============================================================ */

@media print {
    body {
        background-color: white !important;
        color: black !important;
    }
    
    .card {
        border: 1px solid #dee2e6 !important;
        background-color: white !important;
        color: black !important;
    }
}