/* Feed — Beitrag erstellen (CCM-aligned) */

#create-post-modal.ccm-modal {
    align-items: flex-start;
    padding-top: max(12px, env(safe-area-inset-top, 0px));
}

#create-post-modal .modal-content.ccm-panel {
    background: rgba(20, 20, 24, 0.94);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    backdrop-filter: blur(18px) saturate(140%);
    border: 1px solid rgba(255, 165, 0, 0.22);
    border-radius: 16px;
    box-shadow:
        0 18px 48px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin: 12px auto;
    max-width: 520px;
    width: min(520px, calc(100% - 24px));
    max-height: calc(100vh - 24px);
    overflow-y: auto;
    padding: 0;
}

#create-post-modal .modal-header.ccm-header {
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 165, 0, 0.22);
    border-radius: 16px 16px 0 0;
    padding: 1rem 1rem 1rem 1.15rem;
}

#create-post-modal .modal-header.ccm-header h3 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    letter-spacing: 0.02em;
}

#create-post-modal .modal-header .close.ccm-close {
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    line-height: 1;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.85);
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

#create-post-modal .modal-header .close.ccm-close:hover {
    background: rgba(255, 165, 0, 0.12);
    border-color: rgba(255, 165, 0, 0.35);
    color: #ffb84d;
}

#create-post-modal .modal-body.ccm-body {
    padding: 1.15rem 1.15rem 1.35rem;
}

#create-post-modal .ccm-body .form-group {
    margin-bottom: 1rem;
}

#create-post-modal .ccm-body .form-group > label {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.52);
    margin-bottom: 0.4rem;
}

#create-post-modal .feed-post-meta-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

#create-post-modal .feed-post-meta-row .form-group {
    margin-bottom: 0;
}

#create-post-modal .ccm-body input[type="text"],
#create-post-modal .ccm-body textarea,
#create-post-modal .ccm-select {
    width: 100%;
    box-sizing: border-box;
    min-height: 40px;
    padding: 0.55rem 12px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #fff;
    font-size: 0.9rem;
    font-family: inherit;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

#create-post-modal .ccm-body textarea {
    min-height: 110px;
    resize: vertical;
    line-height: 1.45;
}

#create-post-modal .ccm-body input:focus,
#create-post-modal .ccm-body textarea:focus,
#create-post-modal .ccm-select:focus {
    outline: none;
    border-color: rgba(255, 165, 0, 0.45);
    box-shadow: 0 0 0 2px rgba(255, 165, 0, 0.15);
}

#create-post-modal .ccm-body textarea::placeholder {
    color: rgba(255, 255, 255, 0.38);
}

#create-post-modal .ccm-body small {
    display: block;
    margin-top: 0.35rem;
    color: rgba(255, 255, 255, 0.42);
    font-size: 0.72rem;
    line-height: 1.35;
}

#create-post-modal .ccm-profile-select-wrap {
    position: relative;
}

#create-post-modal .ccm-profile-select-wrap::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    pointer-events: none;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#create-post-modal .ccm-profile-select-wrap select.ccm-select {
    appearance: none;
    -webkit-appearance: none;
    padding-right: 2.25rem;
    cursor: pointer;
}

#create-post-modal .ccm-profile-select-wrap .profile-select-arrow {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.75rem;
    transition: color 0.18s ease;
}

#create-post-modal .ccm-profile-select-wrap:focus-within .profile-select-arrow {
    color: #ffb84d;
}

#create-post-modal #post-image-upload-area.file-upload-area {
    padding: 1.25rem 1rem;
    border: 1px dashed rgba(255, 255, 255, 0.18);
    border-radius: 12px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.18s ease, background 0.18s ease;
    color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.02);
}

#create-post-modal #post-image-upload-area.file-upload-area:hover {
    border-color: rgba(255, 165, 0, 0.45);
    background: rgba(255, 165, 0, 0.05);
}

#create-post-modal #post-image-upload-area i {
    color: #ffb84d;
    font-size: 1.5rem;
    margin-bottom: 0.35rem;
    display: block;
}

#create-post-modal #post-image-upload-area p {
    margin: 0;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.75);
}

#create-post-modal .feed-post-image-preview {
    margin-top: 0.65rem;
    position: relative;
    display: inline-block;
    max-width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.25);
}

#create-post-modal .feed-post-image-preview img {
    display: block;
    max-width: 200px;
    max-height: 200px;
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

#create-post-modal .feed-post-preview-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    transition: background 0.18s ease;
}

#create-post-modal .feed-post-preview-remove:hover {
    background: rgba(220, 53, 69, 0.85);
}

#create-post-modal .form-actions {
    display: flex;
    gap: 0.65rem;
    justify-content: flex-end;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#create-post-modal .form-actions .btn-secondary {
    min-height: 40px;
    padding: 0.5rem 1rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s ease, border-color 0.18s ease;
}

#create-post-modal .form-actions .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

#create-post-modal .form-actions .btn-primary {
    min-height: 40px;
    padding: 0.5rem 1.15rem;
    border-radius: 10px;
    border: 1px solid rgba(255, 165, 0, 0.45);
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.9) 0%, rgba(255, 140, 0, 0.85) 100%);
    color: #1a1a1a;
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    transition: filter 0.18s ease, box-shadow 0.18s ease;
}

#create-post-modal .form-actions .btn-primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 4px 16px rgba(255, 165, 0, 0.25);
}

@media (max-width: 520px) {
    #create-post-modal .modal-content.ccm-panel {
        width: calc(100% - 16px);
        margin: 8px auto;
        border-radius: 14px;
    }

    #create-post-modal .modal-header.ccm-header {
        border-radius: 14px 14px 0 0;
    }

    #create-post-modal .feed-post-meta-row {
        grid-template-columns: 1fr;
        gap: 0.65rem;
    }

    #create-post-modal .form-actions {
        flex-direction: column-reverse;
    }

    #create-post-modal .form-actions .btn-primary,
    #create-post-modal .form-actions .btn-secondary {
        width: 100%;
    }
}
