StudioAmico / src /components /InputArea.css
outshine84
path pulsanti
68ff4c1
.input-area {
width: 100%;
max-width: 100%;
margin: 2px 0 0;
}
.input-form {
display: flex;
gap: 10px;
align-items: center;
background: rgba(255, 255, 255, 0.97);
padding: 15px;
border-radius: 14px;
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.14);
backdrop-filter: blur(4px);
}
.text-input {
flex: 1;
min-width: 0;
padding: 12px 15px;
border: 2px solid #e0e0e0;
border-radius: 8px;
font-size: 14px;
font-family: inherit;
transition: border-color 0.3s ease;
min-height: 88px;
resize: vertical;
line-height: 1.45;
}
.input-actions {
display: flex;
align-items: center;
gap: 10px;
flex-wrap: nowrap;
}
.text-input:focus {
outline: none;
border-color: #4CAF50;
}
.text-input:disabled {
background-color: #f5f5f5;
cursor: not-allowed;
}
.mic-button {
padding: 10px 15px;
background: linear-gradient(135deg, #F6B36A 0%, #E78F3C 100%);
color: white;
border: 2px solid #C9782F;
border-radius: 999px;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
box-shadow: 0 4px 10px rgba(199, 120, 47, 0.28);
}
.mic-button:hover:not(:disabled) {
background: linear-gradient(135deg, #F9BF7F 0%, #EE9A49 100%);
transform: translateY(-1px) scale(1.04);
}
.mic-button:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.mic-button.listening {
background: linear-gradient(135deg, #E37C63 0%, #D95D39 100%);
border-color: #B5482A;
animation: pulse 1s ease-in-out infinite;
}
.mic-icon {
display: inline-block;
font-size: 28px;
line-height: 1;
}
.send-icon-img {
width: 32px;
height: 32px;
display: block;
}
.send-button {
padding: 10px 20px;
background: linear-gradient(135deg, #8CC9E6 0%, #5EAED8 100%);
color: white;
border: 2px solid #4F98BE;
border-radius: 999px;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
font-weight: bold;
box-shadow: 0 4px 10px rgba(79, 152, 190, 0.28);
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.send-button:hover:not(:disabled) {
background: linear-gradient(135deg, #9ED3EC 0%, #6CB9DF 100%);
transform: translateY(-1px) scale(1.04);
}
.send-button:disabled {
background: #cccccc;
cursor: not-allowed;
}
.photo-input {
display: none;
position: absolute;
width: 0;
height: 0;
opacity: 0;
}
.photo-button {
padding: 10px 14px;
background: linear-gradient(135deg, #7EB8A5 0%, #4F9E82 100%);
color: white;
border: 2px solid #3E886E;
border-radius: 999px;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(62, 136, 110, 0.26);
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
user-select: none;
-webkit-user-select: none;
}
.photo-button:hover:not(.disabled) {
background: linear-gradient(135deg, #8CC2B1 0%, #5AA78C 100%);
transform: translateY(-1px) scale(1.04);
}
.photo-button.disabled {
opacity: 0.55;
cursor: not-allowed;
pointer-events: none;
}
.camera-button {
padding: 10px 14px;
background: linear-gradient(135deg, #5f9be6 0%, #437fcb 100%);
color: white;
border: 2px solid #3468ac;
border-radius: 999px;
cursor: pointer;
font-size: 18px;
transition: all 0.3s ease;
box-shadow: 0 4px 10px rgba(52, 104, 172, 0.28);
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
user-select: none;
-webkit-user-select: none;
}
.action-icon {
flex: 0 0 auto;
}
.action-label {
font-size: 13px;
font-weight: 700;
line-height: 1;
white-space: nowrap;
}
.camera-button:hover:not(.disabled) {
background: linear-gradient(135deg, #73aae9 0%, #518cd3 100%);
transform: translateY(-1px) scale(1.04);
}
.camera-button.disabled {
opacity: 0.55;
cursor: not-allowed;
pointer-events: none;
}
.input-actions .mic-button,
.input-actions .send-button,
.input-actions .photo-button,
.input-actions .camera-button {
flex: 0 0 auto;
}
@media (min-width: 821px) {
.input-form {
flex-direction: column;
align-items: stretch;
gap: 12px;
}
.text-input {
width: 100%;
}
.input-actions {
width: 100%;
justify-content: flex-start;
flex-wrap: wrap;
}
}
.photo-preview-wrap {
margin-top: 10px;
display: flex;
flex-wrap: wrap;
gap: 8px;
}
.photo-preview {
position: relative;
width: 72px;
height: 72px;
border-radius: 10px;
overflow: hidden;
border: 2px solid #d9e7f2;
background: #fff;
}
.photo-preview img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.photo-remove {
position: absolute;
top: 2px;
right: 2px;
width: 22px;
height: 22px;
border: none;
border-radius: 999px;
background: rgba(0, 0, 0, 0.72);
color: #fff;
font-size: 15px;
line-height: 1;
cursor: pointer;
}
.mic-button.mic-unsupported {
opacity: 0.4;
cursor: not-allowed;
}
.mic-error {
margin-top: 8px;
padding: 10px 14px;
background: #FFF3CD;
border-left: 4px solid #FFC107;
border-radius: 4px;
font-size: 13px;
color: #856404;
}
.listening-indicator {
display: flex;
align-items: center;
gap: 10px;
margin-top: 10px;
padding: 10px;
background: #FFF3E0;
border-left: 4px solid #FF9800;
border-radius: 4px;
font-size: 14px;
color: #E65100;
}
.pulse {
width: 12px;
height: 12px;
background: #FF9800;
border-radius: 50%;
animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
0%, 100% {
box-shadow: 0 0 0 0 rgba(255, 152, 0, 0.7);
transform: scale(1);
}
50% {
box-shadow: 0 0 0 10px rgba(255, 152, 0, 0);
transform: scale(1.1);
}
}
@media (max-width: 480px) {
.input-area {
width: 100%;
}
.input-form {
flex-wrap: wrap;
gap: 8px;
padding: 10px;
}
.text-input {
width: 100%;
flex: 1 1 100%;
min-height: 72px;
margin-bottom: 4px;
font-size: 16px;
padding: 10px 12px;
}
.input-actions {
width: 100%;
flex-wrap: wrap;
gap: 8px;
}
.input-actions .mic-button,
.input-actions .send-button,
.input-actions .photo-button,
.input-actions .camera-button {
flex: 1 1 calc(50% - 4px);
min-height: 44px;
padding: 8px 10px;
}
.action-label {
font-size: 12px;
}
.photo-preview {
width: 64px;
height: 64px;
}
}
@media (max-width: 820px) {
.input-form {
flex-wrap: wrap;
align-items: stretch;
}
.text-input {
width: 100%;
flex: 1 1 100%;
}
.input-actions {
width: 100%;
flex-wrap: wrap;
justify-content: flex-start;
}
.input-actions .mic-button,
.input-actions .send-button,
.input-actions .photo-button,
.input-actions .camera-button {
min-width: 56px;
}
}