/**
 * Theme Name:     timefusion
 * Author:         the WordPress team
 * Template:       twentytwentyfive
 * Text Domain:	   timefusion
 * Version:        2.0.0
 * Domain Path:    /languages
 * Description:    TimeFusion website (GCC and UK versions) as a child theme of Twenty Twenty-Five. Every page is a list of sections edited with ACF Pro; forms use Contact Form 7. The site's design lives in assets/css/style.css; this file only holds WordPress-specific additions.
 */

/* ------------------------------------------------------------------
   WordPress additions. The site design itself is in assets/css/style.css
   and is unchanged from the original HTML website.
   ------------------------------------------------------------------ */

/* Keep the sticky header and the mobile menu below the admin bar for logged-in users.
   (Below 601px the admin bar scrolls away, so no offset is needed there.) */
@media (min-width: 601px) {
	.admin-bar .tf-nav { top: 46px; }
	.admin-bar .scroll-bar { top: 46px; }
}
@media (min-width: 601px) and (max-width: 991.98px) {
	.admin-bar .tf-nav .nav-panel { top: calc(var(--nav-h) + 46px); }
}
@media (min-width: 783px) {
	.admin-bar .tf-nav { top: 32px; }
	.admin-bar .scroll-bar { top: 32px; }
}
@media (min-width: 783px) and (max-width: 991.98px) {
	.admin-bar .tf-nav .nav-panel { top: calc(var(--nav-h) + 32px); }
}

/* Content of pages and posts edited in WordPress (page.php, index.php). */
.wp-content { max-width: 820px; }
.wp-content > * + * { margin-top: 1.1em; }
.wp-content img { max-width: 100%; height: auto; }
.wp-post + .wp-post { margin-top: 48px; padding-top: 48px; border-top: 1px solid var(--line); }
.wp-post h2 a { color: inherit; text-decoration: none; }
.wp-post h2 a:hover { color: var(--blue); }
.wp-pagination { margin-top: 48px; }
.wp-pagination .nav-links { display: flex; gap: 12px; flex-wrap: wrap; }

/* ------------------------------------------------------------------
   Contact Form 7: make its wrappers behave like the original form markup.
   ------------------------------------------------------------------ */
.tf-cf7 .wpcf7-form-control-wrap { display: block; }
.tf-cf7 .hidden-fields-container { display: none; }

/* Field messages: show the original .invalid-feedback text (client check or server check),
   instead of Contact Form 7's generic tip where the original had its own message. */
.tf-cf7.was-validated .wpcf7-form-control-wrap:has(:invalid) ~ .invalid-feedback,
.tf-cf7 .wpcf7-form-control-wrap:has(.wpcf7-not-valid) ~ .invalid-feedback { display: block; }
.tf-cf7 .wpcf7-form-control-wrap:has(~ .invalid-feedback) .wpcf7-not-valid-tip { display: none; }
.tf-cf7 .wpcf7-not-valid-tip { color: var(--absent); font-size: .875em; margin-top: .25rem; }
.tf-cf7 .form-control.wpcf7-not-valid,
.tf-cf7 .form-select.wpcf7-not-valid { border-color: var(--absent); }

/* Status: success uses the original green .form-ok panel; field errors are shown per field;
   a sending failure or spam block uses Contact Form 7's message, styled as an error panel. */
.wpcf7 form.tf-contact-form .wpcf7-response-output { margin: 18px 0 0; padding: 14px 18px; border-radius: 12px; font-size: .95rem; }
.wpcf7 form.tf-contact-form.sent .wpcf7-response-output,
.wpcf7 form.tf-contact-form.invalid .wpcf7-response-output,
.wpcf7 form.tf-contact-form.unaccepted .wpcf7-response-output { display: none; }
.wpcf7 form.tf-contact-form.failed .wpcf7-response-output,
.wpcf7 form.tf-contact-form.aborted .wpcf7-response-output,
.wpcf7 form.tf-contact-form.spam .wpcf7-response-output { border: 1px solid #fecaca; background: #fef2f2; color: #991b1b; }
.wpcf7 form.tf-contact-form.submitting button[type=submit] { opacity: .7; pointer-events: none; }

/* Newsletter: one line like the original; messages go to #nlMsg below the form. */
.tf-newsletter-form .wpcf7-form-control-wrap { flex: 1 1 auto; min-width: 0; }
.tf-newsletter-form .wpcf7-response-output,
.tf-newsletter-form .wpcf7-not-valid-tip { display: none !important; }
.tf-newsletter-form .form-control.wpcf7-not-valid { border-color: #ffadad; }
.wpcf7 form.tf-newsletter-form.submitting button[type=submit] { opacity: .7; pointer-events: none; }

/* ------------------------------------------------------------------
   Home page: screenshots chosen in the Home Page fields, shown in place
   of the built-in illustrations (only when an image is set).
   ------------------------------------------------------------------ */
.frame > img.tf-shot { display: block; height: auto; }
.phone .tf-shot-scr > img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.tf-shot-figure { margin: 0; }
.tf-shot-figure img { display: block; width: 100%; height: auto; border-radius: var(--r-frame); box-shadow: var(--shadow-frame); }
/* About us: a photo chosen for a team member fills the initials circle. */
.person .ph img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
