nakama/frontend/src/components/CreatePostModal.css

270 lines
4.3 KiB
CSS
Raw Normal View History

2025-11-03 20:35:01 +00:00
.modal-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: flex-end;
z-index: 1000;
animation: fadeIn 0.2s;
2025-11-03 21:08:11 +00:00
padding-bottom: 80px; /* Отступ для нижнего меню */
2025-11-03 20:35:01 +00:00
}
.modal-content {
background: var(--bg-secondary);
border-radius: 16px 16px 0 0;
2025-11-03 21:08:11 +00:00
max-height: 80vh;
2025-11-03 20:35:01 +00:00
overflow-y: auto;
width: 100%;
animation: slideUp 0.3s ease-out;
}
.create-post-modal {
display: flex;
flex-direction: column;
}
.modal-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px;
border-bottom: 1px solid var(--divider-color);
position: sticky;
top: 0;
background: var(--bg-secondary);
z-index: 10;
}
.modal-header h2 {
font-size: 18px;
font-weight: 600;
}
.close-btn {
width: 32px;
height: 32px;
border-radius: 50%;
background: transparent;
color: var(--text-secondary);
display: flex;
align-items: center;
justify-content: center;
}
.submit-btn {
padding: 8px 16px;
border-radius: 20px;
2025-11-03 21:08:11 +00:00
background: var(--button-accent);
2025-11-03 20:35:01 +00:00
color: white;
font-size: 14px;
font-weight: 600;
}
.submit-btn:disabled {
opacity: 0.5;
2025-11-03 21:08:11 +00:00
background: var(--text-secondary);
2025-11-03 20:35:01 +00:00
}
.modal-body {
padding: 16px;
display: flex;
flex-direction: column;
gap: 16px;
}
.modal-body textarea {
width: 100%;
padding: 12px;
border: 1px solid var(--border-color);
border-radius: 12px;
background: var(--bg-primary);
color: var(--text-primary);
font-size: 15px;
line-height: 1.5;
resize: vertical;
}
.image-preview {
position: relative;
border-radius: 12px;
overflow: hidden;
}
.image-preview img {
width: 100%;
max-height: 300px;
object-fit: cover;
}
.remove-image-btn {
position: absolute;
top: 8px;
right: 8px;
width: 32px;
height: 32px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.6);
color: white;
display: flex;
align-items: center;
justify-content: center;
}
.tags-section {
display: flex;
flex-direction: column;
gap: 12px;
}
.section-label {
display: flex;
align-items: center;
gap: 8px;
color: var(--text-secondary);
font-size: 14px;
font-weight: 500;
}
.tags-list {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.tag-btn {
padding: 8px 16px;
border-radius: 20px;
font-size: 14px;
font-weight: 600;
transition: all 0.2s;
}
.mentioned-users {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.mentioned-user {
padding: 6px 12px;
border-radius: 16px;
background: var(--button-accent);
color: white;
font-size: 13px;
font-weight: 500;
}
.nsfw-toggle label {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
user-select: none;
}
.nsfw-toggle input {
width: 20px;
height: 20px;
}
.nsfw-toggle span {
font-size: 15px;
color: var(--text-primary);
}
.modal-footer {
display: flex;
gap: 16px;
padding: 16px;
border-top: 1px solid var(--divider-color);
}
.action-icon-btn {
width: 44px;
height: 44px;
border-radius: 50%;
background: var(--bg-primary);
color: var(--button-accent);
display: flex;
align-items: center;
justify-content: center;
}
.user-search-modal {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: var(--bg-secondary);
z-index: 100;
display: flex;
flex-direction: column;
}
.user-search-header {
display: flex;
gap: 8px;
padding: 16px;
border-bottom: 1px solid var(--divider-color);
}
.user-search-header input {
flex: 1;
padding: 10px 16px;
border-radius: 20px;
background: var(--search-bg);
color: var(--text-primary);
font-size: 15px;
}
.user-search-header button {
width: 40px;
height: 40px;
border-radius: 50%;
background: transparent;
color: var(--text-secondary);
display: flex;
align-items: center;
justify-content: center;
}
.user-search-results {
flex: 1;
overflow-y: auto;
}
.user-result {
display: flex;
gap: 12px;
padding: 12px 16px;
cursor: pointer;
transition: background 0.2s;
}
.user-result:active {
background: var(--bg-primary);
}
.user-result img {
width: 44px;
height: 44px;
border-radius: 50%;
object-fit: cover;
}
.user-name {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
}
.user-username {
font-size: 13px;
color: var(--text-secondary);
}