@charset "UTF-8";

body {
	font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	margin: 0;
	padding: 0;
	background-color: #f5f5f5;
	color: #333;
	padding-top: 40px; /* Space for fixed header */
}

.main-container {
	max-width: 100%; /* Allow full width for multiple stopwatches */
	margin: 20px auto;
	padding: 20px;
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	box-sizing: border-box;
}

/* Stopwatch page styling */

/* Stopwatches container */
.stopwatches-container {
	display: flex;
	flex-direction: row; /* Change to row for horizontal layout */
	flex-wrap: wrap; /* Allow wrapping to next line when screen is small */
	gap: 20px;
	margin-bottom: 20px;
	position: relative;
	justify-content: center; /* Center stopwatches */
	width: 100%;
}

/* Individual stopwatch styling */
.stopwatch {
	width: 320px; /* Reduced width from 400px */
	padding: 15px;
	background-color: var(--content-bg-color);
	border-radius: 8px;
	box-shadow: 0 2px 5px rgba(0,0,0,0.1);
	position: relative; /* Keep this for absolute positioning of delete button */
	display: flex;
	flex-direction: column;
	margin-bottom: 10px;
	border: 2px solid var(--border-color);
}

/* Position delete button directly in the stopwatch container */
.delete-btn {
	position: absolute; /* Position directly in stopwatch */
	top: 10px;
	right: 10px;
	font-size: 16px;
	width: 30px;
	height: 30px;
	padding: 0;
	border: none;
	background: var(--content-bg-color);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: all 0.2s;
	z-index: 10;
}

.delete-btn:hover {
	color: #ff4d4d;
	background: rgba(255, 255, 255, 1);
	box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Remove the stopwatch-header class or repurpose it */
.stopwatch-header {
	display: none; /* Hide the header element */
}

/* Stopwatch display container */
.stopwatch-display {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    width: 100%;
    padding: 5px 0;
}

/* Center the stopwatch title input */
.stopwatch-title-input {
    font-size: 18px;
    padding: 5px 10px;
    border: 1px solid var(--border-color);
	background-color: var(--content-bg-color);
	color: var(--font-color);
    border-radius: 4px;
    width: 200px;
    text-align: center;
    margin: 0 auto; /* Center horizontally */
    display: block; /* Ensure block display for margin auto to work */
}

.stopwatch-time {
	font-size: 36px;
	font-weight: bold;
	font-family: monospace;
	padding: 10px;
	background-color: var(--content-bg-color);
	border-radius: 8px;
	width: 100%;
	text-align: center; /* Center the time text */
	margin: 0 auto; /* Center horizontally */
	box-sizing: border-box;
	color: var(--font-color);
}

/* Controls styling */
.stopwatch-controls {
	display: flex;
	justify-content: center;
	gap: 15px;
	margin: 10px 0;
}

.control-btn {
	width: 60px;
	height: 40px;
	font-size: 22px;
	border-radius: 6px;
	border: 1px solid #ddd;
	background-color: black;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: all 0.2s;
	padding: 5px 10px;
}

.control-btn:hover:not(:disabled) {
	background-color: #535353;
	border-color: #ccc;
}

.control-btn:active:not(:disabled) {
	transform: translateY(1px);
	box-shadow: 0 1px 1px rgba(0,0,0,0.05);
}

.control-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.start-btn {
	background-color: #f8f8f8;
	width: 70px;
}

.start-btn:hover:not(:disabled) {
	background-color: #f0f0f0;
}

.lap-btn {
	background-color: #f8f8f8;
}

.lap-btn:hover:not(:disabled) {
	background-color: #f0f0f0;
}

.reset-btn {
	background-color: #f8f8f8;
}

.reset-btn:hover:not(:disabled) {
	background-color: #f0f0f0;
}

/* Laps table styling */
.laps-container {
	width: 100%;
	margin-top: 10px;
	border-bottom: 1px solid #444444;
}

.laps-table {
	width: 100%;
	border-collapse: collapse;
	margin-top: 10px;
	display: none; /* Initially hidden */
	color: var(--font-color);
	border: 1px solid #444444;
}

.laps-table th,
.laps-table td {
	padding: 8px 12px;
	text-align: center;
	border-bottom: 1px solid #eee;
}

.laps-table th {
	background-color: #333;
	color: white;
	font-weight: 600;
	position: sticky;
	top: 0;
	z-index: 10;
}

.laps-table tr:nth-child(even) {
	background-color: var(--alt-content-bg-color);
	color: var(--font-color);
}

.laps-table tr:hover {
	background-color: #f0f0f0;
}

/* Add stopwatch button styling */
.add-stopwatch-btn {
	width: 320px; /* Match new stopwatch width */
	max-width: 320px; /* Limit width */
	height: 40px;
	border-radius: 8px;
	background-color: #4CAF50;
	color: white;
	font-size: 20px;
	border: none;
	cursor: pointer;
	margin-top: 10px;
	transition: background-color 0.3s;
	order: 999; /* Ensures it appears at the end */
	align-self: center; /* Center the button */
}

.add-stopwatch-btn:hover {
	background-color: #45a049;
}

.add-stopwatch-btn::before {
	content: "+ Add Stopwatch";
}

/* Time unit styling */
.time-unit {
	display: inline-block;
}

.time-separator {
	display: inline-block;
	opacity: 0.7;
	margin: 0 2px;
}

.time-unit.ms {
	font-size: 0.8em;
}

/* Disclaimer footer */
.disclaimer-footer {
	width: 100%;
	max-width: 800px;
	margin-top: 30px;
	padding: 15px 0;
	border-top: 1px solid #e0e0e0;
	text-align: center;
	font-size: 14px;
	color: #666;
}

.footer-content {
	padding: 0 15px;
}

.disclaimer-footer a {
	color: #4CAF50;
	text-decoration: none;
}

.disclaimer-footer a:hover {
	text-decoration: underline;
}

.disclaimer-text {
	margin-top: 5px;
	font-size: 12px;
	font-style: italic;
}

/* Responsive styling for smaller screens */
@media (max-width: 600px) {
	.stopwatch-time {
		font-size: 28px;
	}
	
	.control-btn {
		width: 40px;
		height: 40px;
		font-size: 16px;
	}
	
	.stopwatch-header {
		left: 0;
		top: -35px;
	}
}