/*
 * Midtown Events Customizations
 * Scoped to Community Events form wrappers and the JS-added body class.
 */

body.midtown-community-events-page,
body.tribe_community_edit {
    --midtown-heading: #346C77;
    --midtown-input: #346C77A1;
    --midtown-border: #346C7748;
    --midtown-button: #00A199;
    --midtown-button-text: #FFFFFF;
}

body.midtown-community-events-page #tribe-community-events,
body.midtown-community-events-page .tribe-community-events,
body.midtown-community-events-page .tribe-events-community,
body.tribe_community_edit #tribe-community-events,
body.tribe_community_edit .tribe-community-events,
body.tribe_community_edit .tribe-events-community {
    max-width: 980px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    color: var(--midtown-heading) !important;
    font-family: inherit !important;
}

/* Hide the Community/My Events button on the anonymous tenant submission form. */
body.midtown-community-events-page #tribe-community-events a[href*="/community/list/"],
body.midtown-community-events-page #tribe-community-events a[href*="view=my_events"],
body.midtown-community-events-page .tribe-community-events a[href*="/community/list/"],
body.midtown-community-events-page .tribe-community-events a[href*="view=my_events"],
body.midtown-community-events-page .tribe-events-community a[href*="/community/list/"],
body.midtown-community-events-page .tribe-events-community a[href*="view=my_events"],
body.tribe_community_edit #tribe-community-events a[href*="/community/list/"],
body.tribe_community_edit .tribe-community-events a[href*="/community/list/"],
body.tribe_community_edit .tribe-events-community a[href*="/community/list/"] {
    display: none !important;
    visibility: hidden !important;
}

/* Headings and labels */
body.midtown-community-events-page #tribe-community-events h1,
body.midtown-community-events-page #tribe-community-events h2,
body.midtown-community-events-page #tribe-community-events h3,
body.midtown-community-events-page #tribe-community-events legend,
body.midtown-community-events-page #tribe-community-events label,
body.midtown-community-events-page .tribe-community-events h1,
body.midtown-community-events-page .tribe-community-events h2,
body.midtown-community-events-page .tribe-community-events h3,
body.midtown-community-events-page .tribe-community-events legend,
body.midtown-community-events-page .tribe-community-events label,
body.tribe_community_edit #tribe-community-events h1,
body.tribe_community_edit #tribe-community-events h2,
body.tribe_community_edit #tribe-community-events h3,
body.tribe_community_edit #tribe-community-events legend,
body.tribe_community_edit #tribe-community-events label {
    color: var(--midtown-heading) !important;
}

body.midtown-community-events-page #tribe-community-events label,
body.midtown-community-events-page .tribe-community-events label,
body.tribe_community_edit #tribe-community-events label {
    font-weight: 500 !important;
    letter-spacing: 0.08em !important;
    text-transform: uppercase !important;
    font-size: 12px !important;
}

body.midtown-community-events-page #tribe-community-events h2,
body.midtown-community-events-page #tribe-community-events h3,
body.midtown-community-events-page #tribe-community-events legend,
body.midtown-community-events-page .tribe-community-events h2,
body.midtown-community-events-page .tribe-community-events h3,
body.midtown-community-events-page .tribe-community-events legend,
body.tribe_community_edit #tribe-community-events h2,
body.tribe_community_edit #tribe-community-events h3,
body.tribe_community_edit #tribe-community-events legend {
    font-weight: 600 !important;
    letter-spacing: 0.06em !important;
    text-transform: uppercase !important;
}

/* Inputs */
body.midtown-community-events-page #tribe-community-events input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.midtown-community-events-page #tribe-community-events textarea,
body.midtown-community-events-page #tribe-community-events select,
body.midtown-community-events-page .tribe-community-events input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.midtown-community-events-page .tribe-community-events textarea,
body.midtown-community-events-page .tribe-community-events select,
body.tribe_community_edit #tribe-community-events input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]),
body.tribe_community_edit #tribe-community-events textarea,
body.tribe_community_edit #tribe-community-events select {
    color: var(--midtown-input) !important;
    border: 1px solid var(--midtown-border) !important;
    background-color: #fff !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    outline: none !important;
}

body.midtown-community-events-page #tribe-community-events input:focus,
body.midtown-community-events-page #tribe-community-events textarea:focus,
body.midtown-community-events-page #tribe-community-events select:focus,
body.midtown-community-events-page .tribe-community-events input:focus,
body.midtown-community-events-page .tribe-community-events textarea:focus,
body.midtown-community-events-page .tribe-community-events select:focus,
body.tribe_community_edit #tribe-community-events input:focus,
body.tribe_community_edit #tribe-community-events textarea:focus,
body.tribe_community_edit #tribe-community-events select:focus {
    border-color: var(--midtown-button) !important;
    box-shadow: 0 0 0 1px var(--midtown-button) !important;
}

/* TinyMCE / visual editor areas */
body.midtown-community-events-page #tribe-community-events .wp-editor-wrap,
body.midtown-community-events-page #tribe-community-events .mce-panel,
body.midtown-community-events-page .tribe-community-events .wp-editor-wrap,
body.midtown-community-events-page .tribe-community-events .mce-panel,
body.tribe_community_edit #tribe-community-events .wp-editor-wrap,
body.tribe_community_edit #tribe-community-events .mce-panel {
    border-color: var(--midtown-border) !important;
}

/* Buttons */
body.midtown-community-events-page #tribe-community-events input[type="submit"],
body.midtown-community-events-page #tribe-community-events button,
body.midtown-community-events-page #tribe-community-events .button,
body.midtown-community-events-page #tribe-community-events .tribe-button,
body.midtown-community-events-page .tribe-community-events input[type="submit"],
body.midtown-community-events-page .tribe-community-events button,
body.midtown-community-events-page .tribe-community-events .button,
body.midtown-community-events-page .tribe-community-events .tribe-button,
body.tribe_community_edit #tribe-community-events input[type="submit"],
body.tribe_community_edit #tribe-community-events button,
body.tribe_community_edit #tribe-community-events .button,
body.tribe_community_edit #tribe-community-events .tribe-button {
    background: var(--midtown-button) !important;
    background-color: var(--midtown-button) !important;
    color: var(--midtown-button-text) !important;
    border: 1px solid var(--midtown-button) !important;
    border-radius: 0 !important;
    font-weight: 700 !important;
    letter-spacing: 0.12em !important;
    text-transform: uppercase !important;
    box-shadow: none !important;
}

body.midtown-community-events-page #tribe-community-events input[type="submit"]:hover,
body.midtown-community-events-page #tribe-community-events button:hover,
body.midtown-community-events-page #tribe-community-events .button:hover,
body.midtown-community-events-page #tribe-community-events .tribe-button:hover,
body.midtown-community-events-page .tribe-community-events input[type="submit"]:hover,
body.midtown-community-events-page .tribe-community-events button:hover,
body.midtown-community-events-page .tribe-community-events .button:hover,
body.midtown-community-events-page .tribe-community-events .tribe-button:hover,
body.tribe_community_edit #tribe-community-events input[type="submit"]:hover,
body.tribe_community_edit #tribe-community-events button:hover,
body.tribe_community_edit #tribe-community-events .button:hover,
body.tribe_community_edit #tribe-community-events .tribe-button:hover {
    opacity: 0.88 !important;
}

/* Add venue / organizer links should stay visible if the plugin outputs them. */
body.midtown-community-events-page #tribe-community-events a,
body.midtown-community-events-page .tribe-community-events a,
body.tribe_community_edit #tribe-community-events a {
    color: var(--midtown-heading) !important;
}

body.midtown-community-events-page #tribe-community-events a[class*="venue"],
body.midtown-community-events-page #tribe-community-events a[class*="organizer"],
body.midtown-community-events-page #tribe-community-events button[class*="venue"],
body.midtown-community-events-page #tribe-community-events button[class*="organizer"],
body.midtown-community-events-page .tribe-community-events a[class*="venue"],
body.midtown-community-events-page .tribe-community-events a[class*="organizer"],
body.midtown-community-events-page .tribe-community-events button[class*="venue"],
body.midtown-community-events-page .tribe-community-events button[class*="organizer"] {
    visibility: visible !important;
}

.midtown-required-marker,
body.midtown-community-events-page #tribe-community-events .required,
body.midtown-community-events-page .tribe-community-events .required,
body.tribe_community_edit #tribe-community-events .required {
    color: var(--midtown-heading) !important;
    font-size: 11px !important;
    font-style: italic !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}
