/* RDM Calendario Comunitario */

.rdm-calendar-wrap {
    margin: 2.5rem auto;
    max-width: 1120px;
    color: #26312d;
}

.rdm-calendar-hero {
    display: grid;
    grid-template-columns: 1.7fr 0.9fr;
    gap: 1.5rem;
    align-items: stretch;
    margin-bottom: 1.5rem;
}

.rdm-calendar-hero > div {
    background: #fff;
    border: 1px solid rgba(38, 49, 45, 0.10);
    border-radius: 28px;
    padding: 2rem;
    box-shadow: 0 18px 50px rgba(38, 49, 45, 0.07);
}

.rdm-kicker {
    margin: 0 0 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    font-size: 0.78rem;
    font-weight: 700;
    color: #778179;
}

.rdm-calendar-hero h2 {
    margin: 0 0 0.8rem;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
    color: #26312d;
}

.rdm-calendar-hero p {
    margin: 0;
    color: #5f6963;
    font-size: 1.02rem;
    line-height: 1.6;
}

.rdm-hero-note {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.rdm-hero-note strong {
    display: block;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 0.78rem;
    color: #8a7357;
}

.rdm-hero-note span {
    color: #5f6963;
    line-height: 1.55;
}

.rdm-calendar-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.rdm-event-card {
    background: #fff;
    border: 1px solid rgba(38, 49, 45, 0.10);
    border-radius: 24px;
    padding: 1.25rem;
    box-shadow: 0 14px 40px rgba(38, 49, 45, 0.065);
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.rdm-event-top {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.rdm-pill,
.rdm-status {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1;
}

.rdm-pill {
    background: #f3efe8;
    color: #7d684c;
}

.rdm-status {
    background: #eef4ef;
    color: #486250;
}

.rdm-status-cancelado {
    background: #f8eaea;
    color: #8a3a3a;
}

.rdm-status-finalizado {
    background: #eeeeee;
    color: #666666;
}

.rdm-status-en_curso {
    background: #edf3ff;
    color: #395a8a;
}

.rdm-event-card h3 {
    margin: 0 0 0.9rem;
    font-size: 1.45rem;
    line-height: 1.08;
    letter-spacing: -0.025em;
    color: #26312d;
}

.rdm-event-meta {
    display: grid;
    gap: 0.55rem;
    margin-bottom: 1rem;
}

.rdm-event-meta div {
    display: grid;
    grid-template-columns: 6rem 1fr;
    gap: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(38, 49, 45, 0.08);
}

.rdm-event-meta strong {
    color: #7b857d;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.rdm-event-meta span {
    color: #34403a;
    font-size: 0.95rem;
}

.rdm-event-content {
    color: #5f6963;
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.rdm-event-content p:last-child {
    margin-bottom: 0;
}

.rdm-small-note,
.rdm-link-protected,
.rdm-access-ok,
.rdm-access-error {
    font-size: 0.9rem;
    line-height: 1.45;
    border-radius: 16px;
    padding: 0.75rem 0.85rem;
    margin: 0.5rem 0;
}

.rdm-small-note {
    background: #f8f5ef;
    color: #675d4e;
}

.rdm-link-protected {
    background: #f5f6f5;
    color: #616b64;
}

.rdm-access-ok {
    background: #eef6ef;
    color: #3f7049;
}

.rdm-access-error {
    background: #fbefef;
    color: #9b3c3c;
}

.rdm-event-actions {
    margin-top: auto;
    padding-top: 0.8rem;
}

.rdm-btn,
.rdm-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}

.rdm-btn {
    background: #26312d;
    color: #fff !important;
    padding: 0.8rem 1.1rem;
    box-shadow: 0 8px 18px rgba(38, 49, 45, 0.16);
}

.rdm-btn:hover,
.rdm-btn-secondary:hover {
    transform: translateY(-1px);
    opacity: 0.94;
}

.rdm-btn-secondary {
    background: #ede7dd;
    color: #3b342b;
    padding: 0.7rem 0.9rem;
}

.rdm-access-form {
    margin: 0;
}

.rdm-access-form label {
    display: block;
    margin-bottom: 0.4rem;
    color: #6d766f;
    font-size: 0.86rem;
    font-weight: 700;
}

.rdm-access-row {
    display: flex;
    gap: 0.45rem;
}

.rdm-access-row input {
    width: 100%;
    min-width: 0;
    border: 1px solid rgba(38, 49, 45, 0.16);
    border-radius: 999px;
    padding: 0.7rem 0.9rem;
    background: #fff;
}

.rdm-empty {
    background: #fff;
    border: 1px solid rgba(38, 49, 45, 0.10);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 14px 40px rgba(38, 49, 45, 0.065);
}

.rdm-empty h3 {
    margin: 0 0 0.4rem;
    color: #26312d;
}

/* Admin */
.rdm-admin-intro {
    background: #f6f3ee;
    border-left: 4px solid #b49b76;
    padding: 12px 14px;
    margin: 0 0 16px;
    color: #3f463f;
}

.rdm-admin-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
}

.rdm-admin-grid p {
    margin: 0;
}

.rdm-admin-grid label {
    display: block;
    margin-bottom: 0.35rem;
}

.rdm-admin-full {
    grid-column: 1 / -1;
}

.rdm-help-page code,
#rdm_event_help code {
    background: #f4f4f4;
    padding: 3px 6px;
    border-radius: 4px;
}

@media (max-width: 980px) {
    .rdm-calendar-hero {
        grid-template-columns: 1fr;
    }

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

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

@media (max-width: 640px) {
    .rdm-calendar-grid {
        grid-template-columns: 1fr;
    }

    .rdm-calendar-hero > div {
        padding: 1.4rem;
        border-radius: 22px;
    }

    .rdm-event-meta div {
        grid-template-columns: 1fr;
        gap: 0.2rem;
    }

    .rdm-access-row {
        flex-direction: column;
    }

    .rdm-btn-secondary {
        width: 100%;
    }

    .rdm-admin-grid {
        grid-template-columns: 1fr;
    }
}


/* Página pública automática */
body.rdm-calendar-public-page {
    margin: 0;
    background: #fbfaf7;
    color: #26312d;
}

.rdm-public-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.rdm-public-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    padding: 2rem 0 1rem;
    border-bottom: 1px solid rgba(38, 49, 45, 0.12);
    margin-bottom: 1rem;
}

.rdm-public-kicker {
    margin: 0 0 0.2rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    font-size: 0.76rem;
    font-weight: 700;
    color: #8a7357;
}

.rdm-public-header h1 {
    margin: 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1;
    color: #26312d;
}

.rdm-public-header p {
    margin: 0.35rem 0 0;
    color: #6c756e;
}

.rdm-public-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.85rem;
}

.rdm-public-nav a {
    color: #3f4a44;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.93rem;
}

.rdm-public-nav a:hover {
    text-decoration: underline;
}

.rdm-public-footer {
    border-top: 1px solid rgba(38, 49, 45, 0.12);
    padding: 2rem 0 3rem;
    margin-top: 2rem;
}

.rdm-public-footer strong,
.rdm-public-footer span {
    display: block;
}

.rdm-public-footer span {
    color: #6c756e;
    margin-top: 0.3rem;
}

@media (max-width: 980px) {
    .rdm-public-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .rdm-public-nav {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .rdm-public-shell {
        width: min(100% - 24px, 1180px);
    }
}
