/* =========================
   New Post Modal (Full Screen)
   ========================= */

.new-post-modal .modal-content {
    max-width: 100%;
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
    display: flex;
    flex-direction: column;
}

.new-post-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* Header */
.new-post-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    flex-shrink: 0;
}

.new-post-header h3 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.btn-cancel {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: background 0.2s;
}

.btn-cancel:hover {
    background: var(--bg-main);
}

.btn-post {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(74, 143, 181, 0.2);
}

.btn-post:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(74, 143, 181, 0.3);
}

.btn-post:disabled {
    background: var(--bg-main);
    color: var(--text-secondary);
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
}

/* Body */
.new-post-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    -webkit-overflow-scrolling: touch;
}

.post-author-section {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.author-avatar-large {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--accent-teal) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.author-name-large {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.new-post-textarea {
    width: 100%;
    min-height: 200px;
    border: none;
    background: transparent;
    font-size: 16px;
    line-height: 1.6;
    font-family: 'Noto Sans KR', sans-serif;
    color: var(--text-primary);
    resize: none;
    outline: none;
    padding: 0;
    margin-bottom: 16px;
}

.new-post-textarea::placeholder {
    color: var(--text-secondary);
}

/* Image Preview */
.image-preview-container {
    position: relative;
    margin-bottom: 16px;
    border-radius: 12px;
    overflow: hidden;
}

.image-preview {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    display: block;
}

.btn-remove-image {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.btn-remove-image:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* Emotion Preview */
.emotion-preview-container {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    margin-bottom: 16px;
}

.emotion-preview-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.emotion-preview-emoji {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-primary);
}

.btn-remove-emotion {
    margin-left: auto;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.2s;
}

.btn-remove-emotion:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Character Count */
.char-count {
    text-align: right;
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* Footer (Attachment Buttons) */
.new-post-footer {
    display: flex;
    gap: 12px;
    padding: 16px 20px;
    border-top: 1px solid var(--border-light);
    flex-shrink: 0;
}

.attachment-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px;
    background: var(--bg-main);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.attachment-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.attachment-btn .btn-icon {
    font-size: 24px;
}

.attachment-btn .btn-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Emotion Selector Popup */
.emotion-selector-popup {
    position: absolute;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: var(--bg-white);
    border-radius: 16px;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.15);
    z-index: 10;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.emotion-selector-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px;
    border-bottom: 1px solid var(--border-light);
}

.emotion-selector-header h4 {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

.emotion-selector-header button {
    background: transparent;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
}

.emotion-selector-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 16px;
}

.emotion-selector-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: var(--bg-main);
    border: 2px solid transparent;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.emotion-selector-btn:hover {
    background: var(--bg-white);
    border-color: var(--primary);
    transform: scale(1.05);
}

.emotion-emoji-large {
    font-size: 32px;
}

.emotion-label-small {
    font-size: 11px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Mobile Optimization */
@media (max-width: 640px) {
    .new-post-modal .modal-content {
        border-radius: 0;
    }
    
    .new-post-textarea {
        min-height: 150px;
        font-size: 15px;
    }
    
    .emotion-selector-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}
