/* Copyright (C) 2026 Al Massaeed - GPL v3 or later
 *
 * Mobile first. Most punches happen on a phone, held one-handed, often in a
 * hurry on the way through the door.
 */

.attclock {
	text-align: center;
	margin: 18px 0 10px;
}

.attbtn {
	display: block;
	width: 100%;
	max-width: 420px;
	margin: 0 auto;
	padding: 34px 10px;
	border: 0;
	border-radius: 14px;
	font-size: 1.6em;
	font-weight: 700;
	letter-spacing: 0.04em;
	color: #fff;
	cursor: pointer;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.18);
	/* Comfortably past the 44px minimum touch target, and forgiving of a
	   thumb aimed while walking. */
	min-height: 96px;
}

.attbtn-in {
	background: #178a46;
}

.attbtn-out {
	background: #c9252d;
}

.attbtn:active {
	transform: translateY(1px);
}

.attbtn-busy {
	opacity: 0.6;
	cursor: progress;
}

.attstatus {
	margin-top: 10px;
	font-size: 1.05em;
}

.attmonthform {
	margin: 14px 0;
	text-align: center;
}

.attmonthform input[type="month"],
.attmonthform input[type="date"] {
	padding: 7px 10px;
	font-size: 1em;
}

/* ------------------------------------------------------------- calendar */

.attcalwrap {
	overflow-x: auto;
}

.attcal {
	width: 100%;
	max-width: 560px;
	margin: 0 auto;
	border-collapse: collapse;
	table-layout: fixed;
}

.attcal th {
	padding: 6px 0;
	font-size: 0.8em;
	font-weight: 600;
	text-transform: uppercase;
	opacity: 0.6;
}

.attcal td {
	border: 1px solid rgba(128, 128, 128, 0.22);
	height: 52px;
	vertical-align: top;
	padding: 0;
}

.attcal td a {
	display: block;
	height: 100%;
	padding: 4px 3px;
	text-decoration: none;
	color: inherit;
}

.attcal-pad {
	border: 0 !important;
	background: transparent;
}

.attcal-num {
	display: block;
	font-size: 0.85em;
	opacity: 0.75;
}

.attcal-h {
	display: block;
	font-size: 0.8em;
	font-weight: 700;
	color: #178a46;
	line-height: 1.3;
	white-space: nowrap;
}

.attcal-dot {
	color: #2a6fb8;
	font-size: 1.1em;
	line-height: 1;
}

.attcal-off {
	background: rgba(128, 128, 128, 0.08);
}

.attcal-today {
	outline: 2px solid #2a6fb8;
	outline-offset: -2px;
}

.attcal-sel {
	background: rgba(42, 111, 184, 0.13);
}

.atttotal {
	text-align: center;
	margin: 10px 0 18px;
	font-size: 1.1em;
}

/* ---------------------------------------------------------- day + diary */

.attday h3 {
	margin: 18px 0 8px;
}

.attdiary {
	width: 100%;
	box-sizing: border-box;
	font-size: 1em;
	padding: 10px;
	line-height: 1.5;
}

.attdiary-ro {
	padding: 10px;
	background: rgba(128, 128, 128, 0.08);
	border-radius: 6px;
	line-height: 1.5;
}

.attmap {
	height: 240px;
	margin: 12px 0;
	border-radius: 8px;
}

.attmap-big {
	height: 380px;
}

/* -------------------------------------------------------------- flags */

.attflag {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 9px;
	font-size: 0.75em;
	white-space: nowrap;
}

.attflag-auto {
	background: #fde2c4;
	color: #7a4708;
}

.attflag-noloc {
	background: #e2e2e2;
	color: #555;
}

.attflag-edit {
	background: #d6e4f7;
	color: #1d4f85;
}

/* ------------------------------------------------------------ month grid */

.attgrid {
	font-size: 0.82em;
	white-space: nowrap;
}

.attgrid th,
.attgrid td {
	padding: 3px 5px;
	text-align: center;
	border: 1px solid rgba(128, 128, 128, 0.18);
}

.attgrid-name {
	text-align: left !important;
	position: sticky;
	left: 0;
	background: var(--colorbackbody, #fff);
	z-index: 1;
}

.attgrid-d {
	min-width: 34px;
}

.attgrid-auto {
	background: #fde2c4;
}

.attgrid-open {
	background: #d6e4f7;
}

.attgrid-leave {
	background: rgba(128, 128, 128, 0.14);
	font-size: 0.85em;
	opacity: 0.8;
}

.attgrid-absent {
	background: #fadbdb;
}

.attlegend {
	margin: 8px 0 4px;
}

.attedit-btns {
	margin: 12px 0;
}

@media (max-width: 480px) {
	.attbtn {
		font-size: 1.4em;
		padding: 30px 8px;
	}

	.attcal td {
		height: 46px;
	}
}

.attmap-none {
	padding: 14px;
	margin: 12px 0;
	border: 1px dashed rgba(128, 128, 128, 0.45);
	border-radius: 8px;
	text-align: center;
	opacity: 0.65;
	font-size: 0.9em;
}

.attgeotest-wrap {
	margin-top: 8px;
	font-size: 0.85em;
}

.attgeotest {
	opacity: 0.75;
	text-decoration: underline;
}

.attgeoresult {
	margin-top: 5px;
	min-height: 1.2em;
	opacity: 0.85;
}

.attweekday {
	margin-bottom: 7px;
	line-height: 1.45;
}

.attweekday-label {
	display: inline-block;
	min-width: 54px;
	font-weight: 600;
	opacity: 0.7;
	font-size: 0.85em;
}

.attclockcheck {
	padding: 12px 14px;
	border: 1px solid rgba(128, 128, 128, 0.35);
	border-radius: 8px;
	line-height: 1.6;
}

.attgeodetail {
	margin-top: 3px;
	font-family: monospace;
	font-size: 0.78em;
	opacity: 0.6;
}
