/* Add post editor tidy-up
   Link this file after your admin header/layout CSS.
   Example: <link rel="stylesheet" href="assets/css/add-post.css"> */

.post-editor-header {
    margin: 0 0 1.25rem;
    padding: 1.25rem 1.35rem;
    border: 1px solid #e7e5ee;
    border-radius: 12px;
    background: #ffffff;
}

.post-editor-header h1 {
    margin: 0;
    color: #262541;
    font-size: 1.9rem;
    font-weight: 700;
    line-height: 1.2;
}

.post-editor-kicker {
    margin: 0 0 0.35rem;
    color: #6f6a82;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.post-editor-intro {
    max-width: 760px;
    margin: 0.5rem 0 0;
    color: #5d5a69;
    line-height: 1.5;
}

.post-editor-form {
    margin-bottom: 2rem;
}

.post-editor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 1.25rem;
    align-items: start;
}

.post-editor-main,
.post-editor-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.post-editor-sidebar {
    position: sticky;
    top: 1rem;
}

.post-editor-card {
    padding: 1.15rem;
    border: 1px solid #e7e5ee;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(38, 37, 65, 0.05);
}

.post-editor-card-large {
    padding-bottom: 1.25rem;
}

.post-editor-section-heading {
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #efedf4;
}

.post-editor-section-heading h2 {
    margin: 0;
    color: #262541;
    font-size: 1rem;
    font-weight: 700;
}

.post-editor-section-heading p {
    margin: 0.3rem 0 0;
    color: #6f6a82;
    font-size: 0.9rem;
    line-height: 1.45;
}

.post-editor-actions .d-flex {
    flex-direction: column;
}

.post-editor-actions .btn {
    width: 100%;
    font-weight: 600;
    border-radius: 5px;
}

.post-editor-actions .btn-primary {
    background: #262541;
    border-color: #262541;
}

.post-editor-actions .btn-primary:hover,
.post-editor-actions .btn-primary:focus {
    background: #1f1e36;
    border-color: #1f1e36;
}

.form-label {
    color: #262541;
    font-weight: 600;
}

.form-text {
    color: #6f6a82;
}

.form-control:focus,
.form-select:focus {
    border-color: #8f8ba6;
    box-shadow: 0 0 0 0.2rem rgba(38, 37, 65, 0.12);
}

.media-bank-grid {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.media-bank-card {
    border-color: #e7e5ee;
    border-radius: 10px;
    overflow: hidden;
}

.media-bank-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.media-bank-url {
    font-size: 11px;
}

.accordion-button {
    font-weight: 600;
    color: #262541;
}

.accordion-button:not(.collapsed) {
    color: #262541;
    background: #f5f4f8;
}

.alert a {
    font-weight: 600;
}

@media (max-width: 1100px) {
    .post-editor-grid {
        grid-template-columns: 1fr;
    }

    .post-editor-sidebar {
        position: static;
    }

    .post-editor-actions .d-flex {
        flex-direction: row;
    }

    .post-editor-actions .btn {
        width: auto;
    }
}

@media (max-width: 576px) {
    .post-editor-header,
    .post-editor-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .post-editor-header h1 {
        font-size: 1.55rem;
    }

    .post-editor-actions .d-flex {
        flex-direction: column;
    }

    .post-editor-actions .btn {
        width: 100%;
    }
}
