/* FELLESTRENING - CSS Fixes
 * Comprehensive fixes for styling issues
 */

/* ============================================
   FORM FIXES - Ensure text visibility
   ============================================ */

/* Override Material Design form colors */
.form-control, .form-control:focus {
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
}

.form-control:focus {
    border-color: #ffc107 !important;
    box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.25) !important;
}

.bmd-form-group .form-control {
    color: #333 !important;
    background-color: #fff !important;
}

.bmd-form-group.is-focused .form-control {
    color: #333 !important;
    background-color: #fff !important;
}

.bmd-form-group .bmd-label-floating {
    color: #6c757d !important;
}

.bmd-form-group.is-focused .bmd-label-floating {
    color: #ffc107 !important;
}

/* Background-specific form fixes */
.bg-login .form-control,
.bg-home .form-control {
    color: #333 !important;
    background-color: #fff !important;
    border: 1px solid #ddd !important;
}

.bg-login .bmd-label-floating,
.bg-home .bmd-label-floating {
    color: #6c757d !important;
}

.bg-login .bmd-form-group.is-focused .bmd-label-floating,
.bg-home .bmd-form-group.is-focused .bmd-label-floating {
    color: #ffc107 !important;
}

/* ============================================
   BUTTON FIXES
   ============================================ */

.btn-warning {
    background-color: #ffc107 !important;
    border-color: #ffc107 !important;
    color: #000 !important;
}

.btn-warning:hover {
    background-color: #e0a800 !important;
    border-color: #d39e00 !important;
    color: #000 !important;
}

.btn-primary {
    background-color: #007bff !important;
    border-color: #007bff !important;
}

.btn-danger {
    background-color: #dc3545 !important;
    border-color: #dc3545 !important;
}

.btn-success {
    background-color: #28a745 !important;
    border-color: #28a745 !important;
}

/* ============================================
   NAVIGATION FIXES
   ============================================ */

.fixed-top {
    background: #ffffff !important;
    border-bottom: 1px solid #c3c3c3;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    min-height: 60px;
    z-index: 1030;
}

.fixed-bottom {
    background: rgba(255,255,255, 0.95) !important;
    border-top: 1px solid #c3c3c3;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    z-index: 1030;
}

.nav-link {
    color: #333 !important;
    text-decoration: none;
}

.nav-link:hover {
    color: #ffc107 !important;
}

.nav-link.active {
    color: #ffc107 !important;
    font-weight: 600;
}

/* ============================================
   CARD AND LAYOUT FIXES
   ============================================ */

.user-card, .match-card {
    background: white !important;
    border-radius: 10px;
    margin: 10px 0;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.user-card:hover, .match-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.profile-info {
    background: white !important;
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* ============================================
   TEXT AND TYPOGRAPHY FIXES
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: #333 !important;
}

.text-muted {
    color: #6c757d !important;
}

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

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

.text-success {
    color: #28a745 !important;
}

/* ============================================
   ALERT FIXES
   ============================================ */

.alert {
    border-radius: 8px;
    margin: 15px;
    font-weight: 500;
}

.alert-danger {
    background-color: #f8d7da !important;
    border-color: #f5c6cb !important;
    color: #721c24 !important;
}

.alert-success {
    background-color: #d4edda !important;
    border-color: #c3e6cb !important;
    color: #155724 !important;
}

.alert-warning {
    background-color: #fff3cd !important;
    border-color: #ffeaa7 !important;
    color: #856404 !important;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .form-control {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 15px 20px;
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
        font-weight: 600;
        margin: 5px 0;
        border-radius: 25px;
    }
    
    .user-card, .match-card {
        margin: 5px 0;
        padding: 12px;
    }
    
    .fixed-top, .fixed-bottom {
        padding-left: 10px;
        padding-right: 10px;
    }
}

/* ============================================
   PROFILE LINK FIXES
   ============================================ */

.profile-link {
    color: inherit !important;
    text-decoration: none !important;
}

.profile-link:hover {
    color: #ffc107 !important;
    text-decoration: none !important;
}

/* ============================================
   PHOTO GALLERY FIXES
   ============================================ */

.photo-gallery {
    background: white !important;
    border-radius: 10px;
    padding: 20px;
    margin: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.photo-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.photo-thumbnail {
    width: 100%;
    height: 120px;
    object-fit: cover;
    display: block;
}

.photo-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    display: flex;
    gap: 5px;
    opacity: 0;
    transition: opacity 0.3s;
}

.photo-item:hover .photo-actions {
    opacity: 1;
}

/* ============================================
   ACTIVITY TAGS FIXES
   ============================================ */

.activity-tags {
    margin: 15px 0;
}

.activity-tag {
    background: #e9ecef !important;
    color: #495057 !important;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 12px;
    margin-right: 8px;
    margin-bottom: 8px;
    display: inline-block;
}

/* ============================================
   DISTANCE BADGE FIXES
   ============================================ */

.distance-badge {
    background: #ffc107 !important;
    color: #000 !important;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

/* ============================================
   LIKE BUTTON FIXES
   ============================================ */

.like-btn {
    background: #28a745 !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    transition: background-color 0.2s;
}

.like-btn:hover {
    background: #218838 !important;
    color: white !important;
}

/* ============================================
   LOGO AND HEADER FIXES
   ============================================ */

.logo-container {
    text-align: center;
    padding: 20px 0;
}

/* ============================================
   BACKGROUND FIXES
   ============================================ */

.bg-home {
    background: url(../img/bg-home.jpg) no-repeat top center;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}

.bg-login {
    background: url(../img/bg-login.jpg) no-repeat top center;
    background-attachment: fixed;
    background-size: cover;
    min-height: 100vh;
}

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

.text-center {
    text-align: center !important;
}

.text-left {
    text-align: left !important;
}

.text-right {
    text-align: right !important;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 1rem !important; }
