@charset "UTF-8";

body {
	font-family: Arial;
	background: var(--bg-color);
	justify-content: center;
	align-items: center;
	flex-direction: column;
	display: flex;
	padding-top: 50px;
}

.main-container {
	width: 100%;
	align-items: center;
	justify-content: center;
	display: flex;
	flex-direction: column;
}

/* Timer container changes */
.timer {
    order: 1;
    background: var(--content-bg-color);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    padding: 15px;
    position: relative;
    display: flex;
    align-items: center;
    height: auto;
    min-height: 60px;
}

.timer-header {
    position: absolute;
    top: 0;
    left: -40px;
    width: 50px;
    display: flex;
    align-items: center;
    padding: 0px;
}

/* Timer form styling for list view */
.timer-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding: 10px;
}

/* Timer form styling for horizontal input layout */
.timer-form {
    display: flex;
    flex-direction: column;
    width: 100%;
    gap: 12px;
    padding: 10px;
}

/* Create a horizontal container for time inputs */
.time-inputs-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    flex-wrap: wrap; /* Allow wrapping on very small screens */
}

/* Style the input groups to be more compact */
.input-group {
    display: flex;
    align-items: center;
    margin: 0;
    white-space: nowrap;
}

.timer-form input {
    width: 60px;
    padding: 5px;
    margin: 0 5px 0 0;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.timer-form label {
	display: inline;
	justify-content: flex-start;
	margin-right: 12px;
}

.timer-form button {
	padding: 8px;
	background: #4CAF50;
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
}

.timer-form button:hover {
	background: #45a049;
}

/* Container for timers */
.timers-container {
    width: 100%;
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    position: relative;
}


/* Timer needs lower order to appear before button */
.timer {
    order: 1;
    /* rest of your timer styles */
}

/* Timer display in list format */
.timer-display {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Title on the left */
.timer-title {
    font-weight: bold;
    font-size: 20px;
    width: 25%;
    text-align: left;
    padding-left: 10px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
	color: var(--font-color);
}

/* Countdown in the center */
.timer-countdown {
    position: static;
    width: 50%;
    text-align: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 22px;
    letter-spacing: 1px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    background-color: var(--content-bg-color);
	color: var(--font-color);
    border-radius: 4px;
    padding: 8px 0;
    margin: 0 10px;
}

/* Controls on the right */
.timer-controls {
    position: static;
    width: 25%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.add-timer-btn {
    width: 100%;
    max-width: 200px;
    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 */
}

.add-timer-btn:hover {
    background-color: #45a049;
}

.add-timer-btn::before {
    content: "+ Add Timer";
}

input {
	width: 60px;
	padding: 5px;
	margin: 0 5px;
	font-size: 20px;
}

button.playpause {
	margin: 0 5px;
	font-weight: bold;
	font-size: 50px;
	width: 54px;
	height: 54px;
	padding: 0;
	border: 31px solid rgba(0,0,0,0);
	background-color: rgba(0,0,0,0);
	display: inline-flex;
    align-items: center;
    justify-content: center;
	line-height: 30px;
	cursor: pointer;
}

button.playpause:hover {
	border: 31px solid rgba(255,0,0,1);
}

button.delete-btn {
	position: static;
	font-weight: bold;
	font-size: 18px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1px solid rgba(0,0,0,0);
	background-color: rgba(0,0,0,0);
	display: inline-flex;
    align-items: center;
    justify-content: center;
	cursor: pointer;
}

button.delete-btn:hover {
	border: 1px solid rgba(255,0,0,1);
}

/* Style for timer units */
.time-unit {
    display: inline-block;
    padding: 0 4px;
    margin: 0 2px;
    background-color: var(--content-bg-color);
    border-radius: 3px;
    border: 1px solid #eaeaea;
}

/* Style for time separators */
.time-separator {
    margin: 0 2px;
    color: var(--font-color);
}

.text-gray {
    color: #BBBBBB;
}

/* Add this to your existing CSS */
.disabled-btn {
    background-color: #cccccc !important;
    color: #888888 !important;
    cursor: not-allowed !important;
}

.disabled-btn:hover {
    background-color: #cccccc !important;
}

.timer-expired {
    background-color: #ffebeb;
    border: 2px solid #FF0000 !important;
    animation: pulse-background 2s infinite;
}

.timer-paused {
    background-color: #fffbe6;
    border: 2px solid #ffd700;
}

/* Header row with title and sound selector */
.header-row {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin-bottom: 10px;
}

/* Style the sound selector */
.input-group select {
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    font-size: 16px;
    min-width: 120px;
}

.input-group select:focus {
    outline: none;
    border-color: #4CAF50;
}

/* Sound selection group styling */
.sound-selection {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Preview sound button */
.preview-sound-btn {
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #f8f8f8;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
	margin-left: -10px;
}

.preview-sound-btn:hover:not(.disabled-btn) {
    background-color: #e8e8e8;
}

.preview-sound-btn:active:not(.disabled-btn) {
    background-color: #d8d8d8;
}

/* Disabled state for play button */
.preview-sound-btn.disabled-btn {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stop sound button */
.stop-sound {
    background-color: #ffeded;
    border: 1px solid #ffcccc;
}

.stop-sound:hover {
    background-color: #ffe0e0;
}

.stop-sound:active {
    background-color: #ffd0d0;
}

@keyframes pulse-background {
    0% {
        background-color: #ffebeb;
    }
    50% {
        background-color: #ffaaaa;
    }
    100% {
        background-color: #ffebeb;
    }
}