# CC Soccer D11 - Session Handoff
**Date:** March 3, 2026 (afternoon)
**Session:** Mobile admin toolbar overlap fix
**Branch:** `main`

## Last Updated
2026-03-03

## Current State
- All core functionality working
- Mobile admin toolbar overlap resolved (two-part CSS fix, both confirmed on test.ccsoccer.com)
- No schema changes, no config changes
- No `drush cim` or `drush updb` needed; `drush cr` required after pull

---

## ⚠️ Andrew: What You Need To Do

```bash
cd ~/public_html/test_ccsoccer_site
git pull
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web cr
```

No config changes, no schema changes.

---

## What Was Done This Session

### Mobile Admin Toolbar Overlap — Fixed

**Problem:** On mobile, the Drupal admin toolbar and tray were overlapping the CC Soccer site header/nav, hiding the logo and blocking admin menu items.

**Root cause:** `menu-styling.css` had overridden `#toolbar-administration` with `position: relative`, which broke Drupal's default `position: fixed` behavior and `Drupal.displace()` offset mechanism on mobile.

**Fix — Part 1:** `web/modules/custom/ccsoccer/css/menu-styling.css`
Removed `#toolbar-administration` from the `position: relative` rule so Drupal's default fixed positioning is restored. The dev banner styling is unaffected.

**Fix — Part 2:** `web/modules/custom/ccsoccer/css/header-branding.css`
Added a mobile-only rule to drop `.site-header` z-index when `body.toolbar-tray-open` is present (Drupal adds this class when the admin tray is open). This prevents the site header from stacking above the open admin tray and blocking menu items.

```css
@media (max-width: 74.9375rem) {
  body.toolbar-tray-open .site-header {
    z-index: 1;
  }
}
```

Both fixes confirmed working on test.ccsoccer.com on a real mobile device.

---

## Files Modified This Session
| File | Changes |
|------|---------|
| `web/modules/custom/ccsoccer/css/menu-styling.css` | Removed `#toolbar-administration` from `position: relative` rule |
| `web/modules/custom/ccsoccer/css/header-branding.css` | Added `body.toolbar-tray-open .site-header { z-index: 1 }` mobile rule |

---

## Remaining Work

### Inner Page Styling
- [ ] My Orders page
- [ ] My Registrations page
- [ ] Credits page
- [ ] Purchase Jerseys page
- [ ] User profile / edit form
- [ ] Group management page

### Forms
- [ ] Registration form inputs, buttons, visual styling
- [ ] User edit form styling

### Navigation / Mobile
- [ ] Re-add Tournament Schedule to main nav

### Notifications
- [ ] "Don't send to already registered" logic
- [ ] Automated reminders (6/4/2/1 week intervals)

### Deployment Prep
- [ ] Self-host Inter font
- [ ] Re-enable CSS/JS aggregation
- [ ] Final mobile/browser testing
- [ ] Remove IP whitelist block from production `.htaccess`
- [ ] Decide canonical domain (www vs non-www) and uncomment the appropriate redirect rule in `.htaccess`
- [ ] Confirm HTTPS redirect is handled at host level (InMotion), or add RewriteCond to `.htaccess`

### Small Items
- [ ] Breadcrumbs: custom builder for full trails on custom routes
- [ ] Game status: only show ON/CANCELLED after 3pm
- [ ] Contact page — does /contact exist? Footer links to it
- [ ] Social links — Facebook/Instagram URLs are placeholder (#)
- [ ] Hero width mismatch (doesn't go full bleed)
- [ ] Password reset flow for migrated users

---

## Test Server .htaccess (IP Whitelist)

The test server `.htaccess` has an IP whitelist block that is **not in git**.
It's protected from being overwritten by pulls via `skip-worktree`.

If the whitelist is ever lost again, paste this near the top of `web/.htaccess`
(before the `<FilesMatch>` block), then re-run the skip-worktree command:

```apache
# IP Whitelist - Test server only (DO NOT commit to git)
# Note: inline comments after IPs cause 500 errors - keep IPs on one line, no comments
# Note: <RequireAny> container causes 500 on InMotion shared hosting - use single line
# Caleb/Layne: 68.249.41.9 | Andrew: 35.151.50.130 | Dave: 99.8.107.54 | Haley: 97.84.70.141
Require ip 68.249.41.9 35.151.50.130 99.8.107.54 97.84.70.141

# Prevent search engine indexing - Test server only
<IfModule mod_headers.c>
  Header set X-Robots-Tag "noindex, nofollow, noarchive"
</IfModule>
```

```bash
# Run once after editing - prevents git pull from overwriting
git update-index --skip-worktree web/.htaccess

# Verify (should show lowercase 's' prefix)
git ls-files -v web/.htaccess

# To temporarily undo (e.g. to pull a legit .htaccess change)
git update-index --no-skip-worktree web/.htaccess
```

---

## Server Quick Reference
```bash
cd ~/public_html/test_ccsoccer_site
git pull
PATH=/opt/cpanel/ea-php83/root/usr/bin:$PATH /opt/cpanel/ea-php83/root/usr/bin/php vendor/drush/drush/drush.php -r web cr
```

## Git Workflow
- Always `git pull` before `git push` — Andrew may have pushed changes
- `main` is the primary branch
- `settings.local.php` is NOT in git — never commit it, manage per-environment manually
- **Before running `drush cex`:** check diff to avoid reverting config changes from other contributors
