/*
 Theme Name:   GeneratePress Child
 Theme URI:    https://generatepress.com
 Description:  Default GeneratePress child theme
 Author:       Tom Usborne
 Author URI:   https://tomusborne.com
 Template:     generatepress
 Version:      0.1
*/

/* Contact Form 7 */


.floating {
	position: relative;
	margin-bottom: 25px;
  }

  .floating > p {
	margin: 0 !important;
  }

  .wpcf7-form br {
	display: none;
  }

  .cf7-float {
	width: 100%;
	padding: 16px 12px 6px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	transition: all 0.3s ease;
  }

  /* 隐藏 placeholder */
  .cf7-float::placeholder {
	color: transparent;
  }

  .floating label {
	position: absolute;
	top: 10px;
	left: 12px;
	color: #777;
	font-size: 16px;
	pointer-events: none;
	transition: all 0.2s ease;
	padding: 0 5px;
  }
  /* 注：原先的 input.floating label / textarea.floating label 两条规则，
     label 并不是 input/textarea 的子元素，选择器永远匹配不到，已移除。
     浮动 label 的底色统一在下面的 .floating.focused label 里控制。 */

  /* 上浮效果 */
  .floating.focused label,
  .floating input.cf7-float:focus + label,
  .floating input.cf7-float.filled + label,
  .floating input.cf7-float:not(:placeholder-shown) + label,
  .floating textarea.cf7-float:focus + label,
  .floating textarea.cf7-float.filled + label,
  .floating textarea.cf7-float:not(:placeholder-shown) + label {
	top: -8px;
	font-size: 13px;
	color: var(--accent);

	/* 浮动 label 的“遮挡底色”——做边框缺口效果
	   取所在板块的底色 var(--base-2)，让上边框在 label 处“断开”；
	   注意：板块底色将来变更时，这里要跟着同步。
	   若想完全不做遮挡，可改回 background: transparent; */
	background: var(--base-2);
  }

  .floating textarea.cf7-float {
	min-height: 120px;
	padding-top: 16px;
	resize: vertical;
  }

  .cf7-float:focus {
	border-color: var(--accent) !important;
	outline: none;
	box-shadow: 0 0 0 2px rgba(255, 183, 22, 0.2);
  }

  .wpcf7-submit {
	background: var(--accent) !important;
	color: white;
	border: none;
	width: 100%;
	padding: 12px 24px;
	font-size: 16px;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s;
  }

  .wpcf7-submit:hover {
	background: var(--contrast) !important;
  }

  .wpcf7-not-valid {
	border-color: #dc3232;
  }

  .wpcf7-not-valid + label {
	color: #dc3232;
  }

/* 隐藏CF7生成的br标签 */
.wpcf7-form br {
    display: none;
}