builder / style.css
mgbam's picture
Update style.css
5b7a2a2 verified
raw
history blame
2.16 kB
/* style.css */
:root {
--primary-color: #2563eb;
--secondary-color: #6b7280;
--bg-color: #f9fafb;
--text-color: #111827;
--border-radius: 0.375rem;
--spacing: 1rem;
--font-family: 'Inter', sans-serif;
}
*,
*::before,
*::after {
box-sizing: border-box;
}
html {
font-size: 100%;
scroll-behavior: smooth;
}
body {
margin: 0;
padding: 0;
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-family);
line-height: 1.5;
}
.container {
max-width: 800px;
margin: 0 auto;
padding: var(--spacing);
}
h1 {
font-size: 2rem;
margin-bottom: calc(var(--spacing) * 1.5);
text-align: center;
color: var(--primary-color);
}
form {
display: flex;
flex-direction: column;
gap: var(--spacing);
margin-bottom: var(--spacing);
}
label {
font-weight: 600;
margin-bottom: 0.25rem;
}
select,
input[type="text"],
textarea,
button {
font-size: 1rem;
padding: 0.75rem;
border: 1px solid #d1d5db;
border-radius: var(--border-radius);
width: 100%;
}
select:focus,
input:focus,
textarea:focus {
outline: 2px solid var(--primary-color);
border-color: var(--primary-color);
}
button {
background-color: var(--primary-color);
color: #ffffff;
border: none;
cursor: pointer;
transition: background-color 0.2s ease;
}
button:disabled {
opacity: 0.6;
cursor: not-allowed;
}
button:hover:not(:disabled) {
background-color: #1e40af;
}
#result {
margin-top: var(--spacing);
padding: var(--spacing);
background-color: #ffffff;
border: 1px solid #e5e7eb;
border-radius: var(--border-radius);
min-height: 3rem;
}
@media (min-width: 640px) {
form {
flex-direction: row;
align-items: flex-end;
}
form > div {
flex: 1;
}
form > button {
width: auto;
flex-shrink: 0;
}
}
/* Accessibility: High contrast for code labels */
#result[role="alert"] {
border-left: 4px solid var(--primary-color);
}
/* Visually hidden for screen reader announcements */
.sr-only {
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0,0,0,0);
white-space: nowrap;
border: 0;
}