homebox_ai_fronted/frontend/styles.css

408 lines
6.5 KiB
CSS

/* Reset and base styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html, body {
height: 100%;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
background: #1a1a2e;
color: #eee;
}
#app {
min-height: 100%;
display: flex;
flex-direction: column;
}
.screen {
flex: 1;
display: flex;
flex-direction: column;
padding: 16px;
max-width: 500px;
margin: 0 auto;
width: 100%;
}
.hidden {
display: none !important;
}
/* Login Screen */
#login-screen {
justify-content: center;
gap: 24px;
}
#login-screen h1 {
text-align: center;
font-size: 28px;
color: #6c63ff;
}
#login-form {
display: flex;
flex-direction: column;
gap: 12px;
}
/* Form elements */
input, textarea, select {
width: 100%;
padding: 14px 16px;
border: 1px solid #333;
border-radius: 8px;
background: #16213e;
color: #eee;
font-size: 16px;
outline: none;
transition: border-color 0.2s;
}
input:focus, textarea:focus, select:focus {
border-color: #6c63ff;
}
textarea {
resize: vertical;
min-height: 60px;
}
select {
appearance: none;
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23888' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
background-repeat: no-repeat;
background-position: right 12px center;
padding-right: 36px;
}
/* Buttons */
button {
padding: 14px 24px;
border: none;
border-radius: 8px;
font-size: 16px;
font-weight: 600;
cursor: pointer;
transition: transform 0.1s, opacity 0.2s;
}
button:active {
transform: scale(0.98);
}
button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.primary-btn {
background: #6c63ff;
color: white;
}
.primary-btn:hover:not(:disabled) {
background: #5a52d5;
}
.secondary-btn {
background: #333;
color: #eee;
}
.secondary-btn:hover:not(:disabled) {
background: #444;
}
/* Camera Section */
#camera-section {
position: relative;
background: #000;
border-radius: 12px;
overflow: hidden;
aspect-ratio: 4/3;
margin-bottom: 16px;
}
#camera-preview, #photo-preview {
width: 100%;
height: 100%;
object-fit: cover;
}
#photo-canvas {
position: absolute;
top: 0;
left: 0;
}
#camera-controls {
position: absolute;
bottom: 16px;
left: 50%;
transform: translateX(-50%);
display: flex;
gap: 12px;
}
#capture-btn {
width: 64px;
height: 64px;
border-radius: 50%;
background: white;
border: 4px solid #6c63ff;
padding: 0;
}
#capture-btn:active {
background: #ddd;
}
/* Status Section */
#status-section {
display: flex;
align-items: center;
justify-content: center;
gap: 12px;
padding: 20px;
background: #16213e;
border-radius: 8px;
margin-bottom: 16px;
}
.spinner {
width: 24px;
height: 24px;
border: 3px solid #333;
border-top-color: #6c63ff;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* Form Section */
#form-section {
display: flex;
flex-direction: column;
gap: 16px;
}
.form-group {
display: flex;
flex-direction: column;
gap: 6px;
flex: 1;
}
.form-group label {
font-size: 14px;
color: #888;
font-weight: 500;
}
.form-row {
display: flex;
gap: 12px;
}
.form-row .form-group:last-child {
flex: 0 0 80px;
}
/* Collapsible Details */
.more-details {
background: #16213e;
border-radius: 8px;
padding: 12px;
}
.more-details summary {
cursor: pointer;
color: #6c63ff;
font-weight: 500;
font-size: 14px;
user-select: none;
}
.more-details[open] summary {
margin-bottom: 16px;
}
.more-details .form-group {
margin-bottom: 12px;
}
.more-details .form-group:last-child {
margin-bottom: 0;
}
.more-details .form-row {
margin-bottom: 12px;
}
.more-details .form-row .form-group {
margin-bottom: 0;
flex: 1;
}
.more-details .form-row .form-group:last-child {
flex: 1;
}
/* Checkbox */
.checkbox-group label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
color: #eee;
}
.checkbox-group input[type="checkbox"] {
width: 18px;
height: 18px;
accent-color: #6c63ff;
}
/* Tags */
#tags-container {
display: flex;
flex-direction: column;
gap: 8px;
}
#selected-tags {
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.tag-chip {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 12px;
background: #6c63ff;
color: white;
border-radius: 16px;
font-size: 14px;
}
.tag-chip .remove-tag {
cursor: pointer;
font-size: 16px;
line-height: 1;
opacity: 0.7;
}
.tag-chip .remove-tag:hover {
opacity: 1;
}
.tag-chip.tag-new {
background: transparent;
border: 2px dashed #6c63ff;
color: #6c63ff;
}
#tag-input-wrapper {
position: relative;
}
#tag-input {
width: 100%;
}
#tag-suggestions {
position: absolute;
top: 100%;
left: 0;
right: 0;
background: #16213e;
border: 1px solid #333;
border-radius: 8px;
margin-top: 4px;
max-height: 150px;
overflow-y: auto;
z-index: 10;
}
.tag-suggestion {
padding: 10px 14px;
cursor: pointer;
}
.tag-suggestion:hover {
background: #1f3460;
}
/* Success Section */
#success-section {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 16px;
padding: 40px;
text-align: center;
}
.success-icon {
width: 64px;
height: 64px;
background: #4caf50;
color: white;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
font-size: 32px;
}
/* Error Section */
#error-section {
background: #ff5252;
color: white;
padding: 16px;
border-radius: 8px;
text-align: center;
}
#error-section p {
margin-bottom: 12px;
}
.error {
color: #ff5252;
font-size: 14px;
text-align: center;
}
/* Responsive adjustments */
@media (min-width: 600px) {
.screen {
padding: 24px;
}
#camera-section {
aspect-ratio: 16/9;
}
}
/* Safe area for notched phones */
@supports (padding-top: env(safe-area-inset-top)) {
#app {
padding-top: env(safe-area-inset-top);
padding-bottom: env(safe-area-inset-bottom);
padding-left: env(safe-area-inset-left);
padding-right: env(safe-area-inset-right);
}
}