/* =========================================================
   JaimeDiaz.TV — Añadir y editar publicaciones
   ========================================================= */

.jdr-addnews {
    width: min(100% - 32px, 1120px);

    margin: 32px auto 52px;

    color: #182238;
}


/* =========================================================
   Encabezado
   ========================================================= */

.jdr-addnews__hero {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;

    margin-bottom: 22px;
    padding: 27px 29px;

    border: 1px solid #e5eaf1;
    border-radius: 20px;
    background:
        linear-gradient(
            135deg,
            #ffffff 0%,
            #ffffff 72%,
            #fff8ee 100%
        );

    box-shadow: 0 16px 38px rgba(16, 25, 43, 0.07);
}

.jdr-addnews__hero-icon {
    width: 54px;
    height: 54px;

    display: grid;
    place-items: center;

    color: #c96c13;
    border: 1px solid #f2cb94;
    border-radius: 15px;
    background: #fff7e9;

    font-size: 1.2rem;
}

.jdr-addnews__hero-content {
    min-width: 0;
}

.jdr-addnews__eyebrow {
    display: block;

    margin-bottom: 4px;

    color: #c96c13;

    font-size: 0.66rem;
    font-weight: 850;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.jdr-addnews__hero h1 {
    margin: 0;

    color: #17233c;

    font-size: clamp(1.65rem, 3vw, 2.25rem);
    font-weight: 850;
    letter-spacing: -0.045em;
    line-height: 1.05;
}

.jdr-addnews__hero p {
    max-width: 650px;

    margin: 8px 0 0;

    color: #667085;

    font-size: 0.77rem;
    line-height: 1.55;
}

.jdr-addnews__review-status {
    min-width: 210px;

    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: center;

    padding: 13px 15px;

    color: #ffffff;
    border-radius: 13px;
    background: #233a61;

    box-shadow: 0 10px 24px rgba(35, 58, 97, 0.18);
}

.jdr-addnews__review-status > i {
    width: 34px;
    height: 34px;

    display: grid;
    place-items: center;

    color: #ffffff;
    border-radius: 10px;
    background: #f47321;
}

.jdr-addnews__review-status small,
.jdr-addnews__review-status strong {
    display: block;
}

.jdr-addnews__review-status small {
    margin-bottom: 2px;

    color: #cdd5e2;

    font-size: 0.55rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.jdr-addnews__review-status strong {
    font-size: 0.69rem;
    line-height: 1.35;
}


/* =========================================================
   Distribución principal
   ========================================================= */

.jdr-addnews__layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 282px;
    gap: 22px;
    align-items: start;
}

.jdr-addnews__main {
    min-width: 0;

    display: grid;
    gap: 18px;
}


/* =========================================================
   Paneles
   ========================================================= */

.jdr-addnews__panel {
    min-width: 0;
    overflow: hidden;

    margin: 0;

    border: 1px solid #e5eaf1;
    border-radius: 17px;
    background: #ffffff;

    box-shadow: 0 12px 30px rgba(16, 25, 43, 0.055);
}

.jdr-addnews__panel-header {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 13px;
    align-items: start;

    padding: 19px 21px;

    border-bottom: 1px solid #e9edf3;
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fffaf5
        );
}

.jdr-addnews__panel-header > span {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    color: #c96c13;
    border: 1px solid #f2d09d;
    border-radius: 11px;
    background: #fff7e9;
}

.jdr-addnews__panel-header small {
    display: block;

    margin-bottom: 3px;

    color: #c96c13;

    font-size: 0.57rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jdr-addnews__panel-header h2 {
    margin: 0;

    color: #17233c;

    font-size: 1rem;
    font-weight: 820;
    letter-spacing: -0.025em;
}

.jdr-addnews__panel-header p {
    margin: 5px 0 0;

    color: #8290a5;

    font-size: 0.68rem;
    line-height: 1.45;
}

.jdr-addnews__panel-body {
    display: grid;
    gap: 18px;

    padding: 21px;
}


/* =========================================================
   Campos
   ========================================================= */

.jdr-addnews__primary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.jdr-addnews__field {
    min-width: 0;

    display: grid;
    gap: 7px;
}

.jdr-addnews__field--wide {
    width: 100%;
}

.jdr-addnews__field label {
    color: #344054;

    font-size: 0.7rem;
    font-weight: 780;
}

.jdr-addnews__field label > span {
    color: #e85d0f;
}

.jdr-addnews__field > small {
    color: #98a2b3;

    font-size: 0.61rem;
    line-height: 1.4;
}

.jdr-addnews input[type="text"],
.jdr-addnews input[type="search"],
.jdr-addnews input[type="email"],
.jdr-addnews input[type="password"],
.jdr-addnews input[type="url"],
.jdr-addnews input[type="number"],
.jdr-addnews input[type="date"],
.jdr-addnews select,
.jdr-addnews textarea {
    box-sizing: border-box;

    width: 100%;
    min-width: 0;

    padding: 10px 12px;

    color: #182238;
    border: 1px solid #dce3ec;
    border-radius: 10px;
    outline: 0;
    background: #f9fafc;

    font: inherit;
    font-size: 0.72rem;
    line-height: 1.45;

    transition:
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease;
}

.jdr-addnews input[type="text"],
.jdr-addnews input[type="search"],
.jdr-addnews input[type="email"],
.jdr-addnews input[type="password"],
.jdr-addnews input[type="url"],
.jdr-addnews input[type="number"],
.jdr-addnews input[type="date"],
.jdr-addnews select {
    min-height: 42px;
}

.jdr-addnews textarea {
    min-height: 115px;

    resize: vertical;
}

.jdr-addnews input:focus,
.jdr-addnews select:focus,
.jdr-addnews textarea:focus {
    border-color: rgba(244, 115, 33, 0.68);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(244, 115, 33, 0.09);
}

.jdr-addnews input::placeholder,
.jdr-addnews textarea::placeholder {
    color: #aab3c0;
}

.jdr-addnews__category {
    min-width: 0;
}

.jdr-addnews__category select {
    max-width: 100%;
}


/* =========================================================
   Encuesta
   ========================================================= */

.jdr-addnews__poll {
    overflow: hidden;
}

.jdr-addnews__poll-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;

    padding: 18px 21px;

    cursor: pointer;

    list-style: none;
    background:
        linear-gradient(
            135deg,
            #ffffff,
            #fffaf5
        );
}

.jdr-addnews__poll-summary::-webkit-details-marker {
    display: none;
}

.jdr-addnews__poll-icon {
    width: 39px;
    height: 39px;

    display: grid;
    place-items: center;

    color: #c96c13;
    border: 1px solid #f2d09d;
    border-radius: 11px;
    background: #fff7e9;
}

.jdr-addnews__poll-summary small,
.jdr-addnews__poll-summary strong,
.jdr-addnews__poll-summary em {
    display: block;
}

.jdr-addnews__poll-summary small {
    margin-bottom: 2px;

    color: #c96c13;

    font-size: 0.57rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jdr-addnews__poll-summary strong {
    color: #17233c;

    font-size: 0.92rem;
    font-weight: 820;
}

.jdr-addnews__poll-summary em {
    margin-top: 4px;

    color: #8290a5;

    font-size: 0.66rem;
    font-style: normal;
    line-height: 1.4;
}

.jdr-addnews__poll-chevron {
    color: #8290a5;

    font-size: 0.75rem;

    transition: transform 180ms ease;
}

.jdr-addnews__poll[open]
.jdr-addnews__poll-chevron {
    transform: rotate(180deg);
}

.jdr-addnews__poll[open]
.jdr-addnews__poll-summary {
    border-bottom: 1px solid #e9edf3;
}

.jdr-addnews__poll-body {
    display: grid;
    gap: 17px;

    padding: 21px;
}

.jdr-addnews__check {
    width: fit-content;

    display: inline-flex;
    gap: 9px;
    align-items: flex-start;

    margin-top: 4px;

    color: #667085;

    font-size: 0.66rem;
    font-weight: 650;
    line-height: 1.45;
}

.jdr-addnews__check input {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    margin: 1px 0 0;

    accent-color: #f47321;
}


/* =========================================================
   Editores
   ========================================================= */

.jdr-addnews__editor {
    min-width: 0;

    padding: 20px;
}

.jdr-addnews__editor > * {
    max-width: 100%;
}

.jdr-addnews__editor iframe,
.jdr-addnews__editor .tox,
.jdr-addnews__editor .tox-tinymce,
.jdr-addnews__editor .wysibb,
.jdr-addnews__editor .bb-editor {
    max-width: 100%;
}

.jdr-addnews__editor textarea {
    width: 100%;
    min-height: 260px;
}


/* =========================================================
   Campos adicionales y opciones administrativas
   ========================================================= */

.jdr-addnews__xfields {
    min-width: 0;
}

.jdr-addnews__xfields:empty {
    display: none;
}

.jdr-addnews__xfields > * {
    max-width: 100%;
}

.jdr-addnews__xfields label {
    color: #344054;

    font-size: 0.7rem;
    font-weight: 780;
}

.jdr-addnews__admin-options {
    display: grid;
    gap: 9px;
}

.jdr-addnews__admin-options:empty {
    display: none;
}

.jdr-addnews__admin-options label {
    display: flex;
    gap: 9px;
    align-items: flex-start;

    color: #667085;

    font-size: 0.67rem;
    line-height: 1.4;
}

.jdr-addnews__admin-options input[type="checkbox"],
.jdr-addnews__admin-options input[type="radio"] {
    width: 17px;
    height: 17px;

    flex: 0 0 17px;

    margin: 1px 0 0;

    accent-color: #f47321;
}


/* =========================================================
   Verificación
   ========================================================= */

.jdr-addnews__verification:not(
    :has(
        .jdr-addnews__captcha,
        .jdr-addnews__field,
        .jdr-addnews__security-code
    )
) {
    display: none;
}

.jdr-addnews__captcha {
    overflow-x: auto;
}

.jdr-addnews__security-code {
    display: grid;
    grid-template-columns: auto minmax(0, 220px);
    gap: 13px;
    align-items: end;
}

.jdr-addnews__security-code img {
    max-width: 160px;
    height: auto;

    display: block;

    border: 1px solid #e5eaf1;
    border-radius: 9px;
}


/* =========================================================
   Acciones
   ========================================================= */

.jdr-addnews__actions {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;

    padding: 18px 20px;

    border: 1px solid #e5eaf1;
    border-radius: 16px;
    background: #ffffff;

    box-shadow: 0 12px 30px rgba(16, 25, 43, 0.055);
}

.jdr-addnews__required {
    color: #8290a5;

    font-size: 0.64rem;
}

.jdr-addnews__required strong {
    color: #e85d0f;
}

.jdr-addnews__actions > div {
    display: flex;
    gap: 10px;
    align-items: center;
}

.jdr-addnews__button {
    min-height: 42px;

    display: inline-flex;
    justify-content: center;
    gap: 9px;
    align-items: center;

    padding: 9px 15px;

    cursor: pointer;

    border-radius: 10px;

    font: inherit;
    font-size: 0.7rem;
    font-weight: 800;

    transition:
        color 160ms ease,
        border-color 160ms ease,
        background-color 160ms ease,
        box-shadow 160ms ease,
        transform 160ms ease;
}

.jdr-addnews__button:hover {
    transform: translateY(-1px);
}

.jdr-addnews__button--preview {
    color: #344054;
    border: 1px solid #dce3ec;
    background: #ffffff;
}

.jdr-addnews__button--preview:hover {
    color: #c96c13;
    border-color: #f2cb94;
    background: #fffaf5;
}

.jdr-addnews__button--submit {
    color: #ffffff;
    border: 1px solid #17233c;
    background: #17233c;

    box-shadow: 0 10px 22px rgba(23, 35, 60, 0.16);
}

.jdr-addnews__button--submit:hover {
    border-color: #233a61;
    background: #233a61;
}


/* =========================================================
   Barra lateral
   ========================================================= */

.jdr-addnews__sidebar {
    min-width: 0;

    display: grid;
    gap: 14px;

    position: sticky;
    top: 104px;
}

.jdr-addnews__guide {
    padding: 21px;

    color: #ffffff;
    border-radius: 16px;
    background:
        linear-gradient(
            145deg,
            #17233c,
            #233a61
        );

    box-shadow: 0 17px 36px rgba(23, 35, 60, 0.19);
}

.jdr-addnews__guide-icon {
    width: 42px;
    height: 42px;

    display: grid;
    place-items: center;

    margin-bottom: 15px;

    color: #ffffff;
    border-radius: 12px;
    background: #f47321;
}

.jdr-addnews__guide > small {
    display: block;

    margin-bottom: 4px;

    color: #f6bf70;

    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.jdr-addnews__guide h2 {
    margin: 0;

    font-size: 1.08rem;
    font-weight: 820;
}

.jdr-addnews__guide p {
    margin: 10px 0 15px;

    color: #d5dce7;

    font-size: 0.69rem;
    line-height: 1.55;
}

.jdr-addnews__guide ul {
    display: grid;
    gap: 9px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.jdr-addnews__guide li {
    position: relative;

    padding-left: 17px;

    color: #e3e8f0;

    font-size: 0.67rem;
    line-height: 1.45;
}

.jdr-addnews__guide li::before {
    position: absolute;
    top: 0.48em;
    left: 0;

    width: 6px;
    height: 6px;

    content: "";

    border-radius: 50%;
    background: #f6b94a;
}

.jdr-addnews__sidebar-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 11px;
    align-items: start;

    padding: 16px;

    border: 1px solid #e5eaf1;
    border-radius: 14px;
    background: #ffffff;

    box-shadow: 0 10px 24px rgba(16, 25, 43, 0.045);
}

.jdr-addnews__sidebar-card > i {
    margin-top: 2px;

    color: #c96c13;
}

.jdr-addnews__sidebar-card strong {
    display: block;

    color: #233a61;

    font-size: 0.7rem;
}

.jdr-addnews__sidebar-card p {
    margin: 5px 0 0;

    color: #8290a5;

    font-size: 0.64rem;
    line-height: 1.5;
}


/* =========================================================
   Adaptación
   ========================================================= */

@media (max-width: 900px) {

    .jdr-addnews__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .jdr-addnews__sidebar {
        position: static;

        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .jdr-addnews__guide {
        grid-row: span 2;
    }

}

@media (max-width: 700px) {

    .jdr-addnews__hero {
        grid-template-columns: auto minmax(0, 1fr);

        padding: 22px;
    }

    .jdr-addnews__review-status {
        grid-column: 1 / -1;

        width: 100%;
    }

    .jdr-addnews__primary-grid {
        grid-template-columns: minmax(0, 1fr);
    }

}

@media (max-width: 560px) {

    .jdr-addnews {
        width: min(100% - 20px, 1120px);

        margin: 22px auto 34px;
    }

    .jdr-addnews__hero {
        grid-template-columns: minmax(0, 1fr);

        padding: 20px;
    }

    .jdr-addnews__hero-icon {
        width: 48px;
        height: 48px;
    }

    .jdr-addnews__review-status {
        grid-column: auto;
    }

    .jdr-addnews__panel-header,
    .jdr-addnews__poll-summary {
        padding: 17px;
    }

    .jdr-addnews__panel-body,
    .jdr-addnews__poll-body,
    .jdr-addnews__editor {
        padding: 17px;
    }

    .jdr-addnews__security-code {
        grid-template-columns: minmax(0, 1fr);
        align-items: start;
    }

    .jdr-addnews__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .jdr-addnews__actions > div {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .jdr-addnews__button {
        width: 100%;
    }

    .jdr-addnews__sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .jdr-addnews__guide {
        grid-row: auto;
    }

}
