app.css
css3 kB198 linesIn React_Labs_Chapter_08_09_Updated.zip
React_Labs_Chapter_08_09_Updated.ziplab-forms-templatesrcstylesapp.css
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
min-height: 100vh;
padding: 2rem;
}
.form-container {
max-width: 500px;
margin: 0 auto;
background: white;
border-radius: 16px;
padding: 2rem;
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}
.form-title {
text-align: center;
color: #333;
margin-bottom: 1.5rem;
font-size: 1.75rem;
}
.form-group {
margin-bottom: 1.25rem;
}
.form-group label {
display: block;
margin-bottom: 0.5rem;
color: #555;
font-weight: 500;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group select,
.form-group textarea {
width: 100%;
padding: 0.75rem;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 1rem;
transition: border-color 0.2s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
outline: none;
border-color: #667eea;
}
.form-group textarea {
resize: vertical;
min-height: 100px;
}
.star-rating {
display: flex;
gap: 0.5rem;
margin-top: 0.5rem;
}
.star-btn {
background: none;
border: none;
font-size: 2rem;
cursor: pointer;
color: #ddd;
transition: transform 0.1s, color 0.2s;
}
.star-btn:hover {
transform: scale(1.2);
}
.star-btn.filled {
color: #ffc107;
}
.rating-text {
color: #666;
font-size: 0.9rem;
margin-top: 0.5rem;
}
.char-count {
text-align: right;
font-size: 0.85rem;
color: #888;
margin-top: 0.25rem;
}
.char-count.warning {
color: #ff9800;
}
.char-count.danger {
color: #f44336;
}
.button-group {
display: flex;
gap: 1rem;
margin-top: 1.5rem;
}
.btn {
flex: 1;
padding: 0.875rem 1.5rem;
border: none;
border-radius: 8px;
font-size: 1rem;
font-weight: 600;
cursor: pointer;
transition: transform 0.1s, box-shadow 0.2s;
}
.btn:hover {
transform: translateY(-2px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}
.btn:active {
transform: translateY(0);
}
.btn-primary {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
color: white;
}
.btn-secondary {
background: #f5f5f5;
color: #666;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
}
.thank-you {
text-align: center;
padding: 2rem 0;
}
.thank-you h2 {
color: #4caf50;
margin-bottom: 1rem;
font-size: 2rem;
}
.thank-you .checkmark {
font-size: 4rem;
margin-bottom: 1rem;
}
.summary {
background: #f9f9f9;
border-radius: 8px;
padding: 1rem;
margin: 1.5rem 0;
text-align: left;
}
.summary p {
margin: 0.5rem 0;
color: #555;
}
.summary strong {
color: #333;
}
.error-text {
color: #f44336;
font-size: 0.85rem;
margin-top: 0.25rem;
}
.preview {
background: #f0f4ff;
border-radius: 8px;
padding: 1rem;
margin-top: 0.5rem;
font-size: 0.9rem;
color: #667eea;
}