Files
c-atlas/src/components/FormPopup.scss
2025-10-23 23:04:39 +02:00

293 lines
4.9 KiB
SCSS

.form-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.8);
backdrop-filter: blur(8px);
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
visibility: hidden;
transition: all 0.3s ease;
&.visible {
opacity: 1;
visibility: visible;
}
}
.form-popup {
background: linear-gradient(
135deg,
rgba(0, 0, 0, 0.95) 0%,
rgba(20, 20, 20, 0.98) 100%
);
border: 1px solid rgba(247, 184, 1, 0.3);
border-radius: 12px;
width: 90%;
max-width: 500px;
max-height: 90vh;
overflow-y: auto;
backdrop-filter: blur(20px);
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
transform: scale(0.9) translateY(20px);
transition: all 0.3s ease;
overflow: hidden;
.form-overlay.visible & {
transform: scale(1) translateY(0);
}
}
.form-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 24px 24px 0 24px;
border-bottom: 1px solid rgba(247, 184, 1, 0.2);
margin-bottom: 24px;
h3 {
color: #ffffff;
font-size: 20px;
font-weight: 600;
margin: 0;
}
}
.form-close {
background: none;
border: none;
color: #64748b;
cursor: pointer;
padding: 8px;
border-radius: 6px;
transition: all 0.2s ease;
display: flex;
align-items: center;
justify-content: center;
&:hover {
background: rgba(59, 130, 246, 0.1);
color: #649cf9;
}
&:focus {
outline: 2px solid rgba(59, 130, 246, 0.5);
outline-offset: 2px;
}
}
.form-content {
padding: 0 24px 24px 24px;
}
.form-group {
margin-bottom: 20px;
label {
display: block;
color: #ffffff;
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
}
input,
textarea {
width: 100%;
padding: 12px 16px;
background: rgba(247, 184, 1, 0.1);
border: 1px solid rgba(247, 184, 1, 0.2);
border-radius: 8px;
color: #ffffff;
font-size: 14px;
font-family: inherit;
transition: all 0.2s ease;
backdrop-filter: blur(10px);
box-sizing: border-box;
&::placeholder {
color: rgba(247, 184, 1, 0.6);
}
&:focus {
outline: none;
border-color: rgba(247, 184, 1, 0.4);
background: rgba(247, 184, 1, 0.15);
box-shadow: 0 0 0 3px rgba(247, 184, 1, 0.1);
}
&:invalid {
border-color: rgba(239, 68, 68, 0.3);
}
}
textarea {
resize: vertical;
min-height: 100px;
font-family: inherit;
}
}
.form-actions {
display: flex;
gap: 12px;
justify-content: flex-end;
margin-top: 24px;
padding-top: 20px;
border-top: 1px solid rgba(247, 184, 1, 0.2);
}
.form-cancel,
.form-submit {
padding: 12px 20px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
border: 1px solid;
display: flex;
align-items: center;
gap: 8px;
min-width: 100px;
justify-content: center;
&:disabled {
opacity: 0.6;
cursor: not-allowed;
}
}
.form-cancel {
background: transparent;
border-color: rgba(247, 184, 1, 0.3);
color: #f7b801;
&:hover:not(:disabled) {
background: rgba(247, 184, 1, 0.1);
border-color: rgba(247, 184, 1, 0.5);
color: #ffffff;
}
&:focus {
outline: 2px solid rgba(247, 184, 1, 0.5);
outline-offset: 2px;
}
}
.form-submit {
background: rgba(247, 184, 1, 0.1);
border-color: rgba(247, 184, 1, 0.2);
color: #f7b801;
&:hover:not(:disabled) {
background: rgba(247, 184, 1, 0.15);
border-color: rgba(247, 184, 1, 0.3);
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(247, 184, 1, 0.2);
}
&:focus {
outline: 2px solid rgba(247, 184, 1, 0.5);
outline-offset: 2px;
}
}
.submit-loading {
display: flex;
align-items: center;
gap: 8px;
svg {
animation: spin 1s linear infinite;
}
}
@keyframes spin {
from {
transform: rotate(0deg);
}
to {
transform: rotate(360deg);
}
}
.form-error,
.form-success {
padding: 12px 16px;
border-radius: 8px;
margin-top: 16px;
font-size: 14px;
font-weight: 500;
text-align: center;
}
.form-error {
background: rgba(239, 68, 68, 0.1);
border: 1px solid rgba(239, 68, 68, 0.2);
color: #ffffff;
}
.form-success {
background: rgba(34, 197, 94, 0.1);
border: 1px solid rgba(34, 197, 94, 0.2);
color: #ffffff;
}
@media (max-width: 768px) {
.form-popup {
width: 95%;
margin: 20px;
}
.form-header {
padding: 20px 20px 0 20px;
}
.form-content {
padding: 0 20px 20px 20px;
}
.form-actions {
flex-direction: column;
gap: 8px;
.form-cancel,
.form-submit {
width: 100%;
}
}
}
@media (max-width: 480px) {
.form-popup {
width: 100%;
height: 100%;
border-radius: 0;
max-height: none;
}
.form-header {
padding: 16px 16px 0 16px;
}
.form-content {
padding: 0 16px 16px 16px;
}
.form-group {
margin-bottom: 16px;
}
.form-actions {
margin-top: 20px;
padding-top: 16px;
}
}