/*
 * AiProfile Inside: the block with the answers.
 *
 * Everything here is scoped to div.aiprofile-inside, the wrapper the
 * shortcode prints; nothing else on the page is touched. The theme keeps its
 * font, sizes and colours. Two things are ours (since 1.3.2):
 *
 * 1. Case. Some themes (Astra, for one) set text-transform: capitalize on the
 *    body, headings and buttons, which turns every question into Title Case
 *    ("Wat Is De Prijs Per Nacht?"). The answers are written in sentence case
 *    and stay that way. The selectors carry element names and two or three
 *    classes, so they outweigh theme rules such as `.entry-content h2` or
 *    `.ast-separate-container .entry-content h2` without !important.
 *
 * 2. Rhythm. Space above every group of questions but the first, a small gap
 *    under its title and even spacing between the questions, whatever margins
 *    the theme gives its headings and paragraphs (none, or large ones).
 */

div.aiprofile-inside,
div.aiprofile-inside section.aiprofile,
div.aiprofile-inside section.aiprofile *,
div.aiprofile-inside section.aiprofile h2.aiprofile-title,
div.aiprofile-inside section.aiprofile h2.aiprofile-theme-title,
div.aiprofile-inside section.aiprofile h3.aiprofile-theme-title,
div.aiprofile-inside details.aiprofile-qa summary.aiprofile-question,
div.aiprofile-inside details.aiprofile-qa p.aiprofile-answer,
div.aiprofile-inside details.aiprofile-qa p.aiprofile-sources,
div.aiprofile-inside section.aiprofile-stamp p,
div.aiprofile-inside section.aiprofile-stamp a {
	text-transform: none;
}

/* Our own title, only with titel="ja": the same gap as a group title. */
div.aiprofile-inside section.aiprofile h2.aiprofile-title {
	margin: 0 0 0.75em;
	padding: 0;
}

/* Groups: clear space above each one, none above the first. */
div.aiprofile-inside section.aiprofile section.aiprofile-theme {
	margin: 0;
	padding: 0;
}

div.aiprofile-inside section.aiprofile section.aiprofile-theme ~ section.aiprofile-theme {
	margin-top: 2em;
}

/* The group title: the theme's own heading margins do not count here. */
div.aiprofile-inside section.aiprofile section.aiprofile-theme h2.aiprofile-theme-title,
div.aiprofile-inside section.aiprofile section.aiprofile-theme h3.aiprofile-theme-title {
	margin: 0 0 0.6em;
	padding: 0;
}

/* The questions: even spacing between the rows, closed or open. */
div.aiprofile-inside section.aiprofile-theme details.aiprofile-qa {
	margin: 0;
	padding: 0;
}

div.aiprofile-inside section.aiprofile-theme details.aiprofile-qa + details.aiprofile-qa {
	margin-top: 0.75em;
}

div.aiprofile-inside details.aiprofile-qa summary.aiprofile-question {
	margin: 0;
	cursor: pointer;
}

div.aiprofile-inside details.aiprofile-qa p.aiprofile-answer {
	margin: 0.5em 0 0;
}

div.aiprofile-inside details.aiprofile-qa p.aiprofile-sources {
	margin: 0.35em 0 0;
}

/*
 * The stamp at the top of the answers (since 1.3.0).
 *
 * Since 1.3.8 its whole look comes as inline style attributes that the plugin
 * prints with the HTML (aiprofile_inside_inline_styles in aiprofile-inside.php):
 * the white card, the green check, the AI marks, "Powered by AiProfile" with
 * the C-dot right of a thin line, and under the text on a narrow screen. So
 * the badge also looks right where this stylesheet never loads (a headless
 * front end that takes the page's HTML from WordPress), and nothing here
 * competes with it: no border, margin or padding on the stamp in this file,
 * so nothing is drawn or spaced twice. What an inline style cannot do stays
 * here: the underline on the credit link's hover and focus (no underline is
 * inline, so this needs !important to win; the colour stays, as it is an
 * inline !important against themes that force their link colour).
 */

.aiprofile-inside .aiprofile-stamp .aiprofile-credit a:hover,
.aiprofile-inside .aiprofile-stamp .aiprofile-credit a:focus {
	text-decoration: underline !important;
}

/*
 * The plugin's own page layout (since 1.3.6, templates/answers-page.php):
 * only on a theme whose page template leaves out the page content. A
 * readable column between the theme's header and footer; the theme keeps its
 * fonts and colours.
 */
.aiprofile-inside-page {
	box-sizing: border-box;
	width: 100%;
	max-width: 860px;
	margin: 0 auto;
	padding: 48px 20px 64px;
}

.aiprofile-inside-page .aiprofile-inside-page-title {
	margin: 0 0 24px;
}

/* The first sentence above the answers (since 1.4.1, AIP-703): some room before the first group. */
.aiprofile-inside .aiprofile-intro {
	margin: 0 0 1.5em;
}
