@import url('poll_creator.css');

.post-input-container {
max-width: 600px;
margin: 0 auto;
padding: 15px;
padding-top: 100px;
padding-bottom: 5px;
position: relative;
z-index: 10;
}

.post-input-card {
background: #1e2433;
border: 1px solid rgba(74, 158, 255, 0.1);
border-radius: 12px;
padding: 20px;
position: relative;
z-index: 10;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.post-input-card:hover {
background: #252d3f;
border-color: rgba(74, 158, 255, 0.2);
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
transform: translateY(-2px);
}

.post-input-header {
margin-bottom: 15px;
}

.post-input-user {
display: flex;
align-items: center;
gap: 12px;
}

.post-input-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
object-fit: cover;
border: 2px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
cursor: pointer;
}

.post-input-avatar:hover {
border-color: rgba(255, 255, 255, 0.3);
transform: scale(1.05);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-input-user-info {
display: flex;
flex-direction: column;
gap: 2px;
justify-content: center;
}

.post-input-username {
color: white;
font-size: 1rem;
font-weight: 600;
margin: 0;
text-align: center;
}

.post-input-subtitle {
color: rgba(255, 255, 255, 0.6);
font-size: 0.875rem;
margin: 0;
}

.post-input-content {
position: relative;
margin-bottom: 30px;
}

.post-input-textarea {
width: 100%;
background: rgba(255, 255, 255, 0.05);
border: 1px solid rgba(255, 255, 255, 0.1);
border-radius: 8px;
outline: none;
color: white;
font-size: 1rem;
line-height: 1.5;
resize: none;
min-height: 60px;
max-height: 200px;
padding: 12px 16px;
font-family: inherit;
transition: all 0.3s ease;
}

.post-input-textarea:focus {
transform: scale(1.01);
border-color: rgba(255, 255, 255, 0.2);
background: rgba(255, 255, 255, 0.08);
box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
}

.post-input-textarea::placeholder {
color: rgba(255, 255, 255, 0.4);
}

.post-input-char-count {
position: absolute;
bottom: -20px;
right: 0;
color: rgba(255, 255, 255, 0.4);
font-size: 0.75rem;
font-weight: 500;
}

.post-input-char-count.warning {
color: #fbbf24;
}

.post-input-char-count.danger {
color: #ef4444;
}

.post-input-media-preview {
margin-bottom: 12px;
opacity: 0;
transform: translateY(-10px);
max-height: 0;
overflow: hidden;
transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), max-height 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-input-media-preview.show {
opacity: 1;
transform: translateY(0);
max-height: 500px;
}

.post-input-media-preview.hide {
opacity: 0;
transform: translateY(-10px);
max-height: 0;
}

.post-input-media-single {
position: relative;
background: #0f1419;
border-radius: 8px;
overflow: hidden;
cursor: pointer;
transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
align-items: center;
justify-content: center;
max-height: 400px;
border: 1px solid rgba(74, 158, 255, 0.15);
animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.post-input-media-single img,
.post-input-media-single video {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
min-width: 80px;
min-height: 60px;
transition: transform 0.3s ease;
}

.post-input-media-single:hover {
transform: scale(1.01);
border: 2px solid #4a9eff;
}

.post-input-media-single:hover img,
.post-input-media-single:hover video {
transform: scale(1.02);
}

.post-input-media-single:hover .post-input-media-remove {
opacity: 1;
}

.post-input-media {
height: auto;
min-height: 180px;
max-height: 280px;
border-radius: 8px;
overflow: hidden;
border: 1px solid rgba(74, 158, 255, 0.1);
}

.post-input-media .media-previews {
height: 100%;
min-height: 180px;
max-height: 280px;
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
padding: 12px;
background: rgba(255, 255, 255, 0.02);
}

.post-input-media-grid {
display: grid;
grid-template-columns: repeat(2, 1fr);
gap: 12px;
overflow: hidden;
}

.post-input-media-item {
position: relative;
aspect-ratio: 16/9;
border-radius: 8px;
overflow: hidden;
border: 1px solid rgba(74, 158, 255, 0.15);
transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
animation: slideInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
display: flex;
align-items: center;
justify-content: center;
background: #0f1419;
}

.post-input-media-item img,
.post-input-media-item video {
max-width: 100%;
max-height: 100%;
width: auto;
height: auto;
object-fit: contain;
background: #0f1419;
min-width: 80px;
min-height: 60px;
}

.post-input-media-remove {
position: absolute;
top: 8px;
left: 8px;
width: 28px;
height: 28px;
background: rgba(0, 0, 0, 0.8);
border: none;
border-radius: 50%;
color: white;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
font-size: 16px;
font-weight: bold;
transition: all 0.2s ease;
z-index: 10;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.post-input-media-remove:hover {
background: rgba(239, 68, 68, 0.9);
transform: scale(1.1);
}

.error-container {
margin-top: 15px;
transition: all 0.3s ease;
overflow: hidden;
max-height: 0;
opacity: 0;
transform: translateY(-10px);
}

.error-container.show {
max-height: 60px;
opacity: 1;
transform: translateY(0);
}

.error-msg {
color: #ff6b6b;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
font-size: 13px;
text-align: center;
padding: 8px 12px;
background: rgba(255, 107, 107, 0.1);
border: 1px solid #ff6b6b;
border-radius: 8px;
opacity: 0;
transform: translateY(-10px);
transition: all 0.3s ease;
}

.error-msg.show {
opacity: 1;
transform: translateY(0);
}

.error-msg.success {
color: #10b981;
background: rgba(16, 185, 129, 0.1);
border: 1px solid #10b981;
}

@keyframes slideInUp {
from {
opacity: 0;
transform: translateY(30px) scale(0.8);
}
to {
opacity: 1;
transform: translateY(0) scale(1);
}
}

@keyframes contractOut {
to {
opacity: 0;
transform: scale(0.8);
}
}

.post-input-actions {
display: flex;
justify-content: space-between;
align-items: center;
gap: 0;
}

.post-input-buttons {
display: flex;
gap: 8px;
}

.post-input-btn {
display: flex;
align-items: center;
justify-content: center;
width: 36px;
height: 36px;
background: rgba(255, 255, 255, 0.1);
border: none;
color: rgba(255, 255, 255, 0.6);
cursor: pointer;
border-radius: 50%;
transition: all 0.3s ease;
font-size: 0;
position: relative;
overflow: hidden;
}

.post-input-btn::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.5s;
}

.post-input-btn:hover::before {
left: 100%;
}

.post-input-btn:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.9);
transform: scale(1.1) rotate(5deg);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.post-input-btn:disabled {
background: rgba(255, 255, 255, 0.05);
color: rgba(255, 255, 255, 0.3);
cursor: not-allowed;
}

.post-input-media-btn {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.6);
}

.post-input-media-btn:hover:not(:disabled) {
background: rgba(255, 255, 255, 0.2);
color: rgba(255, 255, 255, 0.9);
}

.post-input-poll-btn {
background: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.6);
}

.post-input-poll-btn:hover:not(:disabled) {
background: rgba(34, 197, 94, 0.2);
color: rgba(34, 197, 94, 1);
}

.post-input-media-count {
display: flex;
align-items: center;
font-size: 0.75rem;
color: rgba(255, 255, 255, 0.4);
margin-left: 4px;
}

.post-input-submit {
display: flex;
align-items: center;
justify-content: center;
gap: 6px;
background: linear-gradient(135deg, rgba(245, 158, 11, 0.15), rgba(217, 119, 6, 0.1));
border: 1px solid rgba(245, 158, 11, 0.25);
color: rgba(251, 191, 36, 0.9);
cursor: pointer;
padding: 8px 16px;
border-radius: 20px;
transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
font-size: 0.8rem;
font-weight: 600;
position: relative;
backdrop-filter: blur(8px);
text-align: center;
min-width: 80px;
overflow: hidden;
}

.post-input-submit::before {
content: '';
position: absolute;
top: 0;
left: -100%;
width: 100%;
height: 100%;
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
transition: left 0.6s;
}

.post-input-submit:hover::before {
left: 100%;
}

.post-input-submit:hover:not(:disabled) {
background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(217, 119, 6, 0.2));
border-color: rgba(245, 158, 11, 0.35);
color: white;
transform: translateY(-3px) scale(1.08);
box-shadow: 0 12px 30px rgba(245, 158, 11, 0.4);
}

.post-input-submit i {
transition: transform 0.3s ease;
}

.post-input-submit:hover:not(:disabled) i {
transform: translateX(2px) rotate(15deg);
}

.post-input-submit:disabled {
opacity: 0.5;
cursor: not-allowed;
transform: none;
box-shadow: none;
background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.03));
border-color: rgba(255, 255, 255, 0.1);
color: rgba(255, 255, 255, 0.3);
}

.post-input-submit.loading {
opacity: 0.7;
cursor: not-allowed;
}

.post-input-submit.loading svg {
animation: spin 1s linear infinite;
}

@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}

@media (max-width: 640px) {
.post-input-container {
padding: 8px 16px;
padding-top: 100px;
padding-bottom: 0px;
z-index: 50;
}

.post-input-card {
padding: 12px;
margin-bottom: -70px;
z-index: 50;
}

.post-input-header {
margin-bottom: 8px;
}

.post-input-user {
gap: 8px;
}

.post-input-avatar {
width: 40px;
height: 40px;
}

.post-input-content {
margin-bottom: 32px;
}

.post-input-actions {
flex-direction: row;
gap: 8px;
align-items: center;
justify-content: space-between;
margin-top: 16px;
}

.post-input-buttons {
gap: 8px;
}

.post-input-btn {
width: 32px;
height: 32px;
}

.post-input-submit {
padding: 6px 12px;
font-size: 0.8rem;
min-width: 60px;
}

.post-input-media-grid {
grid-template-columns: repeat(2, 1fr);
gap: 6px;
}

.post-input-textarea {
font-size: 0.9rem;
min-height: 50px;
}
}