347 lines
7.2 KiB
CSS
347 lines
7.2 KiB
CSS
@charset "UTF-8";
|
|
|
|
:root {
|
|
/* Primary colors */
|
|
--color-primary: #4299e1;
|
|
--color-primary-dark: #3182ce;
|
|
--color-primary-darker: #2563eb;
|
|
--color-primary-light: #bae6fd;
|
|
--color-primary-lighter: #ebf8ff;
|
|
--color-primary-lightest: #f0f9ff;
|
|
|
|
/* Text colors */
|
|
--color-text-primary: #374151;
|
|
--color-text-secondary: #1e40af;
|
|
--color-text-tertiary: #0369a1;
|
|
--color-text-muted: gray;
|
|
--color-text-black: black;
|
|
--color-text-dark: #333;
|
|
|
|
/* Background colors */
|
|
--color-bg-body: whitesmoke;
|
|
--color-bg-white: white;
|
|
--color-bg-light: #fefefe;
|
|
--color-bg-file: #f8fafc;
|
|
|
|
/* Border colors */
|
|
--color-border-light: #e5e7eb;
|
|
--color-border-medium: #d1d5db;
|
|
--color-border-file: #cbd5e0;
|
|
|
|
/* State colors */
|
|
--color-required: #dc2626;
|
|
--color-hover-light: #dbeafe;
|
|
--color-hover-medium: #bfdbfe;
|
|
--color-emoji-bg: #ddeeff;
|
|
--color-emoji-border: #339;
|
|
|
|
/* Shadow colors */
|
|
--shadow-primary: rgba(66, 153, 225, 0.1);
|
|
--shadow-primary-strong: rgba(66, 153, 225, 0.3);
|
|
}
|
|
|
|
body {
|
|
max-width: 940px;
|
|
margin: 0 auto;
|
|
padding: 1em;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background-color: var(--color-bg-body);
|
|
color: var(--color-text-black);
|
|
}
|
|
|
|
a {
|
|
font-weight: bold;
|
|
}
|
|
|
|
legend {
|
|
background-color: var(--color-bg-white);
|
|
padding: 6px 12px;
|
|
border-radius: 4px;
|
|
font-weight: 600;
|
|
color: var(--color-text-primary);
|
|
border: 1px solid var(--color-border-medium);
|
|
}
|
|
|
|
fieldset {
|
|
border: 2px solid var(--color-border-light);
|
|
border-radius: 6px;
|
|
padding: 16px;
|
|
margin-bottom: 16px;
|
|
background-color: var(--color-bg-light);
|
|
}
|
|
|
|
/* Grid layout for emoji fieldsets */
|
|
fieldset.emoji-group {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(2em, 1fr));
|
|
gap: 0.3em;
|
|
}
|
|
|
|
input[type="text"],
|
|
input[type="number"],
|
|
input[type="password"],
|
|
textarea,
|
|
select {
|
|
width: 100%;
|
|
padding: 10px 12px;
|
|
border: 1px solid var(--color-border-medium);
|
|
border-radius: 6px;
|
|
font-family: inherit;
|
|
font-size: 1em;
|
|
resize: none;
|
|
transition: border-color 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
input[type="text"]:focus,
|
|
input[type="number"]:focus,
|
|
input[type="password"]:focus,
|
|
textarea:focus,
|
|
select:focus {
|
|
outline: none;
|
|
border-color: var(--color-primary);
|
|
box-shadow: 0 0 0 2px var(--shadow-primary);
|
|
}
|
|
|
|
input[type="file"] {
|
|
width: 100%;
|
|
padding: 10px;
|
|
border: 2px dashed var(--color-border-file);
|
|
border-radius: 6px;
|
|
background-color: var(--color-bg-file);
|
|
cursor: pointer;
|
|
font-size: 14px;
|
|
transition: all 0.3s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
input[type="file"]:hover {
|
|
border-color: var(--color-primary);
|
|
background-color: var(--color-primary-lighter);
|
|
}
|
|
|
|
input[type="file"]:focus {
|
|
outline: none;
|
|
border-color: var(--color-primary);
|
|
box-shadow: 0 0 0 3px var(--shadow-primary);
|
|
}
|
|
|
|
button {
|
|
padding: 10px 20px;
|
|
border: 1px solid var(--color-primary);
|
|
border-radius: 6px;
|
|
background-color: var(--color-primary-lightest);
|
|
color: var(--color-text-secondary);
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
button:hover {
|
|
background-color: var(--color-hover-light);
|
|
border-color: var(--color-primary-dark);
|
|
}
|
|
|
|
button:focus {
|
|
outline: none;
|
|
border-color: var(--color-primary-darker);
|
|
box-shadow: 0 0 0 2px var(--shadow-primary);
|
|
}
|
|
|
|
button:active {
|
|
background-color: var(--color-hover-medium);
|
|
}
|
|
|
|
label {
|
|
font-weight: 600;
|
|
color: var(--color-text-primary);
|
|
text-align: left;
|
|
padding-top: 0;
|
|
margin-bottom: 3px;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
label.description {
|
|
font-weight: 300;
|
|
color: var(--color-text-muted);
|
|
text-align: left;
|
|
padding-top: 0;
|
|
margin-bottom: 3px;
|
|
line-height: 1.2;
|
|
}
|
|
|
|
/*
|
|
The two common display options for responsive layouts are flex and grid.
|
|
flex (aka Flexbox) aligns items either horizontally or vertically.
|
|
grid can align items in two dimensions.
|
|
grid also allows more precise positioning of elements, so I'm using that.
|
|
*/
|
|
.home-container {
|
|
display: grid;
|
|
}
|
|
|
|
.home-sidebar{
|
|
padding-bottom: 1em;
|
|
}
|
|
|
|
.site-description {
|
|
font-size: 1.2rem;
|
|
color: var(--color-text-dark);
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.profile-row {
|
|
display: flex;
|
|
width: 100%;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.tick-form {
|
|
display: flex;
|
|
flex-direction: column;
|
|
width: 100%;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.mood-bar {
|
|
display: flex;
|
|
width: 100%;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 0.5em;
|
|
}
|
|
|
|
.fieldset-items {
|
|
margin-bottom: 14px;
|
|
display: grid;
|
|
grid-template-columns: 1fr;
|
|
gap: 6px;
|
|
align-items: start;
|
|
}
|
|
|
|
.file-input-wrapper {
|
|
position: relative;
|
|
width: 100%;
|
|
}
|
|
|
|
.file-info {
|
|
background-color: var(--color-primary-lightest);
|
|
border: 1px solid var(--color-primary-light);
|
|
border-radius: 4px;
|
|
padding: 8px;
|
|
margin-top: 8px;
|
|
font-size: 13px;
|
|
color: var(--color-text-tertiary);
|
|
grid-column: 1;
|
|
}
|
|
|
|
.delete-btn {
|
|
background-color: #fef2f2;
|
|
color: #dc2626;
|
|
border: 1px solid #fca5a5;
|
|
padding: 10px 20px;
|
|
border-radius: 6px;
|
|
font-size: 14px;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.delete-btn:hover {
|
|
background-color: #fee2e2;
|
|
border-color: #f87171;
|
|
}
|
|
|
|
.delete-btn:focus {
|
|
outline: none;
|
|
border-color: #dc2626;
|
|
box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.1);
|
|
}
|
|
|
|
.delete-btn:active {
|
|
background-color: #fecaca;
|
|
}
|
|
|
|
.required {
|
|
color: var(--color-required);
|
|
}
|
|
|
|
.tick {
|
|
margin-bottom: 1em;
|
|
}
|
|
|
|
.tick-time {
|
|
color: var(--color-text-muted);
|
|
font-size: 0.8em;
|
|
}
|
|
|
|
.tick-text {
|
|
color: var(--color-text-black);
|
|
font-size: 1.0em;
|
|
}
|
|
|
|
.pagination a {
|
|
margin: 0 5px;
|
|
text-decoration: none;
|
|
}
|
|
|
|
.emoji-option input {
|
|
display: none;
|
|
}
|
|
|
|
.emoji-option span {
|
|
font-size: 1.4em;
|
|
display: inline-block;
|
|
padding: 0.2em;
|
|
border-radius: 0.3em;
|
|
}
|
|
|
|
.emoji-option input:checked + span {
|
|
background-color: var(--color-emoji-bg);
|
|
outline: 2px solid var(--color-emoji-border);
|
|
}
|
|
|
|
/*
|
|
Responsive layout - adjusts from 1 to 2 columns based on screen width
|
|
- min-width makes the mobile (stacked) view the default
|
|
- 600px covers most mobile devices in portrait mode
|
|
- Once the width exceeds that (e.g. desktops), it will convert to horizontal alignment
|
|
*/
|
|
@media (min-width: 600px) {
|
|
label {
|
|
text-align: right;
|
|
padding-top: 10px; /* Match input padding */
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
label.description {
|
|
padding-top: 10px;
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.home-container {
|
|
grid-template-columns: 1fr 2fr;
|
|
grid-gap: 2em;
|
|
}
|
|
|
|
.fieldset-items {
|
|
margin-bottom: 16px;
|
|
display: grid;
|
|
grid-template-columns: 200px 1fr;
|
|
gap: 16px;
|
|
align-items: start;
|
|
}
|
|
|
|
.file-info {
|
|
grid-column: 2; /* Align with input column */
|
|
}
|
|
|
|
.form-row .fieldset-items {
|
|
grid-template-columns: 200px 1fr;
|
|
gap: 16px;
|
|
margin-bottom: 16px;
|
|
}
|
|
} |