/* Minimal styles for EduDx Runs Overview - relies on existing Elementor styles */

/* .er-root {
    max-width: 1024px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
} */
.er-detail-page .elementor-element[data-id="1c0ecec"],
.er-detail-page .elementor-element[data-id="5f1c762"],
.er-detail-page .elementor-element[data-id="5287bc8"],
.er-detail-page .elementor-element[data-id="6f6cd6b"],
.er-overview-page .elementor-element[data-id="1c0ecec"],
.er-overview-page .elementor-element[data-id="5f1c762"],
.er-overview-page .elementor-element[data-id="5287bc8"],
.er-overview-page .elementor-element[data-id="6f6cd6b"] {
    display: none !important;
}
.er-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.er-filter {
    background: #f4f8f9;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.er-filter.er-filter-has-selection {
    border-color: rgb(15, 89, 110);
    box-shadow: 0 4px 12px rgba(15, 89, 110, 0.18);
}

.er-filter-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.er-filter-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1e293b;
}

.er-filter-reset {
    border: 1px solid transparent;
    background: rgba(148, 163, 184, 0.15);
    color: #475569;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 500;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.er-filter-reset:hover {
    background: rgba(15, 89, 110, 0.18);
    color: rgb(15, 89, 110);
}

.er-filter-reset[disabled] {
    cursor: default;
    opacity: 0.5;
    background: rgba(148, 163, 184, 0.1);
    color: #94a3b8;
    box-shadow: none;
}

.er-filter-description {
    margin: 0 0 0.75rem 0;
    color: #475569;
    font-size: 0.9rem;
}

.er-filter-body {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.er-filter-placeholder,
.er-filter-empty,
.er-filter-error {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    border-radius: 10px;
    font-size: 0.9rem;
}

.er-filter-placeholder,
.er-filter-empty {
    border: 1px dashed #b7d6dc;
    color: #64748b;
    background: #fff;
}

.er-filter-error {
    border: 1px solid rgba(239, 68, 68, 0.35);
    color: #b91c1c;
    background: rgba(254, 226, 226, 0.6);
}

.er-filter-option {
    border: 1px solid #b7d6dc;
    background: #fff;
    color: #1e293b;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.2;
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.er-filter-option:hover {
    border-color: #7aa2aa;
    background: #f3f8f9;
}

.er-filter-option--active {
    background: linear-gradient(135deg, rgba(15, 89, 110, 1) 0%, rgba(12, 73, 90, 1) 100%);
    color: #fff;
    border-color: rgb(15, 89, 110);
    border-width: 2px;
    box-shadow: 0 4px 12px rgba(15, 89, 110, 0.35);
    position: relative;
}

.er-filter-option--active:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 89, 110, 0.4);
}

.er-filter-option--active::before {
    content: '✓';
    font-weight: 700;
    font-size: 0.95rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
}

.er-filter-option:focus-visible,
.er-filter-reset:focus-visible {
    outline: 3px solid rgba(15, 89, 110, 0.45);
    outline-offset: 2px;
}

.er-filter-option--list {
    border-radius: 10px;
    width: 100%;
    justify-content: space-between;
    display: flex;
    align-items: center;
    text-align: left;
    flex: 1 1 100%;
}

.er-filter-option--list.er-filter-option--active {
    background: linear-gradient(135deg, rgba(15, 89, 110, 1) 0%, rgba(12, 73, 90, 1) 100%);
    color: #fff;
    border-color: rgb(15, 89, 110);
}

.er-filter-option--list.er-filter-option--active::before {
    margin-right: 0.35rem;
}

.er-filter-option--chip {
    border-radius: 12px;
}

.er-filter-option--cloud {
    border: none;
    background: transparent;
    color: #0f172a;
    padding: 0.25rem 0.5rem;
}

.er-filter-option--cloud:hover {
    color: rgb(15, 89, 110);
}

.er-filter-option--cloud.er-filter-option--active {
    background: rgba(15, 89, 110, 0.18);
    border-radius: 999px;
    color: rgb(15, 89, 110);
    box-shadow: none;
}

.er-filter-option--cloud.er-filter-option--active:hover {
    background: rgba(15, 89, 110, 0.28);
}

.er-filter-option--weight-1 {
    font-size: 0.85rem;
}

.er-filter-option--weight-2 {
    font-size: 1rem;
}

.er-filter-option--weight-3 {
    font-size: 1.15rem;
    font-weight: 500;
}

.er-filter-option--weight-4 {
    font-size: 1.3rem;
    font-weight: 600;
}

.er-toolbar .er-search {
    flex: 1 1 260px;
}

.er-price-field.er-price-locked .elementor-field {
    color: #94a3b8;
    background-color: #f1f5f9;
}

.er-price-field.er-price-locked .elementor-field::placeholder {
    color: #94a3b8;
}

.er-price-field.er-price-locked .er-field-label {
    color: #64748b;
}

.er-price-gate {
    margin-top: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #b7d6dc;
    border-radius: 8px;
    background: #f3f8f9;
    color: #1e293b;
    font-size: 0.9rem;
}

.er-price-gate__controls {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.5rem;
}

.er-price-gate__controls .elementor-field {
    flex: 1 1 220px;
}

.er-price-gate__controls .elementor-button {
    flex: 0 0 auto;
}

.er-price-gate__hint {
    margin-top: 0.5rem;
    color: #475569;
    font-size: 0.85rem;
}

.er-price-gate__error {
    margin-top: 0.5rem;
    color: #b91c1c;
    font-size: 0.85rem;
}

.er-price-gate--hidden {
    display: none !important;
}

.er-toolbar .facetwp-input-wrap {
    display: flex;
    align-items: center;
    background: #fff;
    border: 1px solid #d7d7d7;
    border-radius: 999px;
    padding: 0.45rem 0.9rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.er-toolbar .facetwp-input-wrap:focus-within {
    border-color: rgb(15, 89, 110);
    box-shadow: 0 0 0 3px rgba(15, 89, 110, 0.18);
}

.er-toolbar .facetwp-icon {
    position: relative;
    width: 14px;
    height: 14px;
    margin-right: 0.6rem;
    color: #777;
}

.er-toolbar .facetwp-icon::before,
.er-toolbar .facetwp-icon::after {
    content: '';
    position: absolute;
    display: block;
}

.er-toolbar .facetwp-icon::before {
    width: 100%;
    height: 100%;
    border: 2px solid currentColor;
    border-radius: 50%;
}

.er-toolbar .facetwp-icon::after {
    width: 7px;
    height: 2px;
    background: currentColor;
    transform: rotate(45deg);
    bottom: -4px;
    right: -1px;
    border-radius: 999px;
}

.er-toolbar .facetwp-search {
    flex: 1;
    border: none;
    outline: none;
    font-size: 0.95rem;
    color: #333;
    background: transparent;
}

.er-toolbar .facetwp-search::placeholder {
    color: #9e9e9e;
}

.er-toolbar .er-controls {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.er-toolbar label {
    font-weight: 600;
    color: #333;
    font-size: 0.9rem;
}

.er-pagination .elementor-pagination {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

#er-pagination-top {
    margin-left: auto;
}

#er-pagination-bottom {
    width: 100%;
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}

#er-pagination-bottom .elementor-pagination {
    margin: 0 auto;
}

.er-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid transparent;
    background: #f3f5f7;
    color: #334155;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.er-pagination .page-numbers:hover {
    background: #e6edf2;
    color: rgb(15, 89, 110);
}

.er-pagination .page-numbers.current {
    background: rgb(15, 89, 110);
    color: #fff;
    border-color: rgb(15, 89, 110);
}

.er-pagination .page-numbers.prev,
.er-pagination .page-numbers.next {
    width: auto;
    padding: 0 0.8rem;
    border-radius: 999px;
}


/* Loading state */
.er-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* Detail view specific styles */
.er-detail {
    max-width: 800px;
    margin: 0 auto;
}

.er-detail-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.er-back-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    padding: 0.5rem 1rem;
    cursor: pointer;
    border-radius: 3px;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.er-back-btn:hover {
    background: #e6e6e6;
}

.er-detail-title {
    margin: 0.5rem 0 0 0;
    color: #333;
    font-size: 1.8rem;
}

.er-detail-meta {
    margin: 0.25rem 0 0 0;
    color: #475569;
    font-size: 0.95rem;
}

.er-detail-content {
    line-height: 1.6;
}

.er-summary {
    background: #f9f9f9;
    padding: 1rem;
    border-left: 4px solid rgb(15, 89, 110);
    margin-bottom: 1.5rem;
}

.er-description {
    margin-bottom: 1.5rem;
}

.er-description h4 {
    margin: 0 0 0.5rem 0;
    color: #333;
}

.er-run-info {
    background: #f9f9f9;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.er-run-info h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.er-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.er-info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.3rem 0;
    border-bottom: 1px solid #eee;
}

.er-info-label {
    font-weight: bold;
    color: #666;
}

.er-info-value {
    color: #333;
}

.er-costs {
    margin-bottom: 1.5rem;
}

.er-costs h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.er-cost-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem;
    border: 1px solid #ddd;
    margin-bottom: 0.5rem;
    border-radius: 3px;
}

.er-cost-type {
    font-weight: bold;
}

.er-cost-amount {
    color: rgb(15, 89, 110);
    font-weight: bold;
}

.er-course-days {
    margin-bottom: 1.5rem;
}

.er-course-days h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.er-course-day {
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    margin-bottom: 0.3rem;
    border-radius: 3px;
    background: #f9f9f9;
}

.er-other-runs h4 {
    margin: 0 0 1rem 0;
    color: #333;
}

.er-other-run {
    margin-bottom: 0.5rem;
}

.er-other-run a {
    color: rgb(15, 89, 110);
    text-decoration: none;
    padding: 0.3rem 0.5rem;
    border: 1px solid #ddd;
    border-radius: 3px;
    display: inline-block;
}

.er-other-run a:hover {
    background: #f0f0f0;
    text-decoration: underline;
}

.er-subscription {
    margin-top: 2.5rem;
}

.er-form-message {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 8px;
    font-weight: 500;
}

.er-form-message--success {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.4);
}

.er-form-message--error {
    background: rgba(239, 68, 68, 0.15);
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.elementor-form .er-field-error,
.elementor-form .er-field-error .elementor-field,
.elementor-form .er-field-error.elementor-field {
    border-color: rgba(239, 68, 68, 0.65) !important;
    box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.2);
}

/* Subscription form layout enhancements */
.er-subscription .elementor-form-fields-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.er-subscription .elementor-form-fields-wrapper > .er-form-section {
    flex: 0 0 auto;
}

.er-form-section {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.4rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.er-form-section--training {
    padding-bottom: 1rem;
}

.er-form-section__title {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0f172a;
}

.er-form-grid {
    display: grid;
    gap: 1rem;
}

.er-form-grid--two {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.er-form-grid--three {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.er-form-grid--schedule,
.er-form-grid--schedule-meta {
    grid-template-columns: minmax(320px, 2fr) minmax(200px, 1fr);
    align-items: end;
}

.er-form-grid--schedule select,
.er-form-grid--schedule-meta input {
    max-width: 100%;
}

.er-form-grid--invoice {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.6rem 0.9rem;
}

.er-form-section--invoice {
    padding: 1.5rem 1.75rem;

}

.er-form-section--invoice .er-form-stack {
    display: block;
}

.er-form-section--invoice .er-form-grid--invoice {
    gap: 0.75rem 1.25rem;
    margin-bottom: 0.75rem;
}

.er-form-section--invoice .er-form-grid--invoice:last-of-type {
    margin-bottom: 0;
}

.er-form-section--notes textarea {
    min-height: 140px;
}

.er-consent-field {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.er-consent-field__input {
    appearance: auto;
    -webkit-appearance: auto;
    width: 18px;
    height: 18px;
    margin-top: 3px;
    accent-color: #eb6012;
}

.er-consent-field__label {
    font-weight: 500;
    color: #0f172a;
}

.er-consent-field__label--inline {
    display: block;
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: #0f172a;
}

.er-consent-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.er-consent-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
    color: #0f172a;
}

.er-consent-option input[type="radio"] {
    appearance: auto;
    -webkit-appearance: auto;
    width: 18px;
    height: 18px;
    accent-color: #eb6012;
}

.er-form-stack {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.er-form-stack .elementor-field-group {
    margin-bottom: 0;
}

@media (max-width: 900px) {
    .er-form-grid--schedule,
    .er-form-grid--schedule-meta {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    }
}

@media (max-width: 640px) {
    .er-form-section {
        padding: 1rem;
    }

    .er-form-section__title {
        font-size: 1rem;
    }
}
