@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;700&display=swap');

:root {
	--green: #2ecc71;
	--red: #e74c3c;
	--gray: #95a5a6;
	--dark: #2c3e50;
}
body { font-family: 'Poppins', sans-serif; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-size: 16px;
	margin: 0 auto; max-width: 800px; background: #f4f7f6; color: var(--dark); }

/*p { margin: 0; }*/

h2 { margin: 0 0 8px; }

a,a:hover,a:active,a:visited,a:focus { color: inherit; text-decoration: none; }

/* Top Nav */
nav { background: #fff; padding: 15px; display: flex; align-items: center; border-bottom: 1px solid #ddd; }
.back-btn { text-decoration: none; font-size: 30px; margin-right: 15px; color: var(--dark); }

/* Match Card */
.card { background: #fff; margin: 15px; padding: 20px; border-radius: 12px; box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.card h1 { margin: 0 0 10px 0; font-size: 1.4rem; }
.card p { margin: 5px 0; color: #666; }

/* Roster List */
.roster-section { margin: 15px; }
.player-row { 
	display: flex; justify-content: space-between; align-items: center; gap: 5px;
	background: #fff; padding: 5px 12px; margin-bottom: 8px; border-radius: 8px;
    transition: background-color 0.3s ease;
}
a.player-row { text-decoration:none; color:inherit; }
.player-row.flash { background-color: rgba(0, 255, 0, 0.1); }

.player-name { flex: 1; }
.status-icon { font-weight: 700; font-size: 1.0rem; }
.status-pip { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%;
    vertical-align: middle; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.status-accepted { background-color: #dcfce7; color: #16a34a; border: 1px solid #87d3a3; }
.status-rejected { background-color: #fee2e2; color: #dc2626; border: 1px solid #fecaca; }
.status-pending { background-color: #f3f4f6; color: #7a879b; border: 1px solid #d0d1d4; }
.status-warning { background-color: #fef7e2; color: #dcac26; border: 1px solid #fef4ca; }



/* Bottom Action Bar */
.rsvp-bar { 
	position: fixed; bottom: 0; width: 100%; max-width: inherit; background: #fff; 
	padding: 10px; border-top: 1px solid #ddd; box-sizing: border-box;
	text-align: center;
}
.btn-group { display: flex; gap: 10px; margin-top: 10px; justify-content: space-around; width: 100%; }
.btn { 
	flex: 1; padding: 12px; border: none; border-radius: 8px; min-width: 100px;
	color: white; font-weight: bold; font-size: 1rem; cursor: pointer;
}
.btn-large { padding: 20px; font-size: 1.2rem; }

.btn-accepted { background: var(--green); }
.btn-rejected { background: var(--red); }
.btn-active { outline: 3px solid var(--dark); outline-offset: 2px; }
.btn-ghosted { background: #f3f4f6; color: #7a879b; }
.btn:disabled { cursor: not-allowed; }

/* Register page */
.register-page { font-family: 'Poppins', sans-serif; padding: 40px 20px; background: #f4f7f6; text-align: center; }
.join-card { background: #fff; padding: 30px; border-radius: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.1); }
input, select { width: 100%; padding: 12px; margin: 4px 0; border: 1px solid #ccc; border-radius: 8px; box-sizing: border-box; font-size: 1rem; }
.btn-join { background: #2ecc71; color: white; border: none; padding: 15px; width: 100%; border-radius: 8px; font-weight: bold; cursor: pointer; }
.admin-claim-info { margin-bottom: 25px; text-align: center; }
.join-desc { font-size: 0.9rem; color: #666; margin-top: 15px; line-height: 1.4; }
.is-claim-badge {
    margin: 0 -30px 20px -30px;
    padding: 15px;
    border-radius: 15px 15px 0 0;
    border-bottom: 1px solid #fde047;
    background: #fef9c3;
    color: #854d0e;
    font-size: 0.9rem;
    font-weight: bold;
}
.is-claim-badge .fa-floorball-player {
    margin-right: 8px;
    vertical-align: middle;
}

/* Installation instructions */
.lock-card { display: flex; flex-direction: column; gap: 15px; }

.ios-only, .android-only { display: none; }
body.is-ios .ios-only { display: block; margin-top: 20px; }
body.is-android .android-only { display: block; margin-top: 20px; }






/* Push notification overlay */
.push-notification-overlay {
	display:none; position:fixed; bottom:20px; left:20px; right:20px;
    justify-content: space-around;
    gap: 10px;
	background:#2c3e50; color:white;
	padding:20px; border-radius:15px; z-index:9999;
	flex-direction:column; align-items:center; text-align:center;
	box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}






/* Error messages */
.error-banner {
    position: fixed;
    top: -100px; /* Start hidden above the screen */
    left: 0;
    right: 0;
    background-color: #d32f2f; /* Material Design Red */
    color: white;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    z-index: 9999;
    transition: top 0.3s ease-out;
}

.error-banner.show {
    top: 0; /* Slide down to the top */
}

.error-dismiss {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 5px;
}










/* Dashboard Specific Layouts */
.nav-actions { display: flex; gap: 10px; }

.match-hero h1 { font-size: 1.8rem; margin-top: 5px; }

.player-match-status {
    padding: 12px;
    border-radius: 8px;
    margin: 15px 0;
    font-weight: bold;
    text-align: center;
}

/* Roster Summary Styles */
.roster-summary { text-decoration: none; color: inherit; display: block; }
.summary-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.count-badge { background: var(--dark); color: white; padding: 2px 8px; border-radius: 20px; font-size: 0.9rem; text-wrap-mode: nowrap; }

/* Progress Bar */
.progress-container {
    height: 8px;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 15px;
}
.progress-bar {
    height: 100%;
    background: var(--green);
    transition: width 0.5s ease-out;
}

/* Pip Preview */
.player-pips-preview { display: flex; gap: 4px; align-items: center; margin-bottom: 10px; font-size: 0.9rem; font-weight: bold; }
.more-players { font-size: 0.8rem; color: #666; font-weight: bold; }
.view-all-link { font-size: 0.9rem; color: var(--dark); font-weight: bold; text-align: right; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 20px; color: #95a5a6; }
.empty-state i { margin-bottom: 15px; opacity: 0.5; }










/* Settings Page Polish */
.settings-container { padding-bottom: 40px; }

/* Grouped Rows inside a Card */
.settings-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
}

.settings-info p { font-size: 0.95rem; }
.settings-info .status-text { font-size: 0.8rem; color: var(--gray); }

.divider {
    border: 0;
    height: 1px;
    background: #eee;
    margin: 15px 0;
}

/* Make disabled inputs look intentional */
.form-group.read-only input {
    background: #f9f9f9;
    color: #999;
    border-style: dashed;
}

.app-info {
    text-align: center;
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--gray);
}

.btn-block { width: 100%; border-radius: 8px; font-weight: bold; cursor: pointer; border: none; }

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.card-status-header {
    margin: -20px -20px 20px -20px; /* Pulls it to the edges of the card */
    padding: 10px;
    text-align: center;
    font-size: 0.8rem;
    font-weight: bold;
    border-radius: 12px 12px 0 0; /* Matches card corner radius */
}

.card-status-header.admin {
    background: #fef9c3;
    color: #854d0e;
    border-bottom: 1px solid #fde047;
}






/* The slider */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #ccc;
  transition: .3s;
  border-radius: 24px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .slider {
  background-color: var(--green);
}

input:checked + .slider:before {
  transform: translateX(22px);
}

















/* Admin Specifics */
.admin-section-title { margin: 20px 15px 10px 15px; font-weight: bold; }

.match-row {
    background: #fff;
    padding: 12px 15px;
    margin: 0 15px 10px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.match-info { display: flex; flex-direction: column; }
.match-loc { font-size: 0.9rem; color: #666; }
.match-cap { font-size: 0.8rem; background: #eee; padding: 2px 6px; border-radius: 4px; align-self: flex-start; margin-top: 4px; }

/* Form adjustments */
/*.form-group { margin-bottom: 15px; text-align: left; }
.form-group label { display: block; margin-bottom: 5px; font-weight: bold; font-size: 0.9rem; }
*/

.form-group {
    display: flex;
    align-items: center;
    gap: 12px;         /* Space between emoji and input */
    margin-bottom: 4px;
}

.form-group label {
    font-size: 1.2rem; /* Make emojis a bit bigger */
    flex-shrink: 0;    /* Prevent the emoji from squishing */
    width: 25px;       /* Fixed width so inputs align vertically */
    text-align: center;
}

.form-group input {
    flex-grow: 1;      /* Take up the remaining horizontal space */
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 6px;
	margin: 4px;
    font-family: inherit;
}





.admin-fab {
    position: fixed;
    top: 15px;
    right: 15px;
    background: var(--dark);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    font-size: 1.2rem;
    border: 2px solid white;
}

/* Ensure it doesn't overlap the back button on the left */
nav { position: relative; }



.player-actions {
    display: flex;
    gap: 8px;
}

/* .btn-action { background: #f4f4f4; border: 1px solid #ddd; border-radius: 4px; cursor: pointer; } */
/* Base style for small action buttons in a list */
.btn-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 8px; /* Matches your 8px join button */
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #f3f4f6; /* Default gray */
    color: #4b5563;
}
.btn-action-large {
    width: 38px;
    height: 38px;
    font-size: 1.58rem;
}
.btn-action:active { transform: scale(0.92); }
.btn-action.accepted { background-color: #dcfce7; color: #16a34a; }
.btn-action.rejected { background-color: #fee2e2; color: #dc2626; }
/*.is-not-admin { filter: grayscale(1); opacity: 0.3; }*/









/* Specific layout for the admin creation card */
.card-admin {
    padding: 15px;
}

.card-title-compact {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Horizontal Form Utility */
.form-inline {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.form-label-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
    width: 25px;
    text-align: center;
}

.form-input-full {
    flex-grow: 1;
    padding: 10px;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 6px;
    background: var(--input-bg, #fff);
    font-family: inherit;
}

/* Action Buttons */
.btn-block {
    width: 100%;
    margin-top: 5px;
}

/* Roster Grouping */
.admin-list-group {
    margin-top: 25px;
}

.beat {
    display: inline-block;
    border-radius: 5px;
    width: 5px;
    height: 16px;
    margin: 0 2px;
    --hover-scale: 1.5;
}

.beat.success { background-color: green; }
.beat.tentative { background-color: orange; }
.beat.failed { background-color: red; }
.beat.disabled { background-color: gray; }

.player-container {
    min-height: 50px; /* Ensures the 'drop zone' stays open */
    display: flex;
    flex-direction: column;
}
