/*
Theme Name: Twenty Twenty-Five
Theme URI: https://wordpress.org/themes/twentytwentyfive/
Author: the WordPress team
Author URI: https://wordpress.org
Description: Twenty Twenty-Five emphasizes simplicity and adaptability. It offers flexible design options, supported by a variety of patterns for different page types, such as services and landing pages, making it ideal for building personal blogs, professional portfolios, online magazines, or business websites. Its templates cater to various blog styles, from text-focused to image-heavy layouts. Additionally, it supports international typography and diverse color palettes, ensuring accessibility and customization for users worldwide.
Requires at least: 6.7
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.3
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: twentytwentyfive
Tags: one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, style-variations, accessibility-ready, blog, portfolio, news
*/

/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
	text-decoration-thickness: 1px !important;
	text-underline-offset: .1em;
}

/* Focus styles */
:where(.wp-site-blocks *:focus) {
	outline-width: 2px;
	outline-style: solid;
}

/* Increase the bottom margin on submenus, so that the outline is visible. */
.wp-block-navigation .wp-block-navigation-submenu .wp-block-navigation-item:not(:last-child) {
	margin-bottom: 3px;
}

/* Increase the outline offset on the parent menu items, so that the outline does not touch the text. */
.wp-block-navigation .wp-block-navigation-item .wp-block-navigation-item__content {
	outline-offset: 4px;
}

/* Remove outline offset from the submenus, otherwise the outline is visible outside the submenu container. */
.wp-block-navigation .wp-block-navigation-item ul.wp-block-navigation__submenu-container .wp-block-navigation-item__content {
	outline-offset: 0;
}

/*
 * Progressive enhancement to reduce widows and orphans
 * https://github.com/WordPress/gutenberg/issues/55190
 */
h1, h2, h3, h4, h5, h6, blockquote, caption, figcaption, p {
	text-wrap: pretty;
}

/*
 * Change the position of the more block on the front, by making it a block level element.
 * https://github.com/WordPress/gutenberg/issues/65934
*/
.more-link {
	display: block;
}



/* ========== Root & Resets ========== */
:root {
  --form-font: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  --color-text: #1e293b;
  --color-muted: #64748b;
  --color-bg: #ffffff;
  --color-border: #cbd5e1;
  --color-focus: #2563eb;
  --color-error: #dc2626;
  --color-success: #16a34a;
  --color-disabled: #e2e8f0;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 2px 6px rgba(0,0,0,0.08);
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.25rem;
  --space-5: 1.5rem;
  --space-6: 2rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

form {
  font-family: var(--form-font);
  color: var(--color-text);
  background: var(--color-bg);
}

/* ========== Form Layout Helpers ========== */
.form {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-5);
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.form h2,
.form h3 {
  margin: 0 0 var(--space-3);
  line-height: 1.2;
}

.form .form-row {
  display: grid;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

@media (min-width: 720px) {
  .form .form-row--2 {
    grid-template-columns: 1fr 1fr;
  }
  .form .form-row--3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== Labels & Inputs ========== */
.label {
  display: inline-block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.required::after {
  content: " *";
  color: var(--color-error);
  font-weight: 700;
}

.help-text {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-muted);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--color-text);
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(0,0,0,0.02);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
  min-height: 120px;
  resize: vertical;
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, #94a3b8 50%),
    linear-gradient(135deg, #94a3b8 50%, transparent 50%),
    linear-gradient(to right, #cbd5e1, #cbd5e1);
  background-position:
    calc(100% - 18px) calc(1.1em),
    calc(100% - 13px) calc(1.1em),
    calc(100% - 2.2rem) 0.5rem;
  background-size:
    6px 6px,
    6px 6px,
    1px 1.8rem;
  background-repeat: no-repeat;
  padding-right: 2.5rem;
}

/* Focus states for accessibility */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-focus);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* Disabled & Readonly */
input[disabled],
select[disabled],
textarea[disabled],
input[readonly],
select[readonly],
textarea[readonly] {
  background: #f8fafc;
  color: #94a3b8;
  border-color: var(--color-disabled);
  cursor: not-allowed;
}

/* Fieldset & Legend */
fieldset {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-4);
  margin: var(--space-4) 0;
}

legend {
  padding: 0 var(--space-2);
  font-weight: 700;
  color: var(--color-text);
}

/* Checkboxes & Radios */
.form-check {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

input[type="checkbox"],
input[type="radio"] {
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--color-focus);
}

/* File input */
input[type="file"] {
  border: none;
  padding: 0;
}

/* ========== Validation States ========== */
.is-error input,
.is-error select,
.is-error textarea {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.12);
}

.is-success input,
.is-success select,
.is-success textarea {
  border-color: var(--color-success);
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.12);
}

.error-text {
  margin-top: 0.35rem;
  color: var(--color-error);
  font-size: 0.9rem;
}

.success-text {
  margin-top: 0.35rem;
  color: var(--color-success);
  font-size: 0.9rem;
}

/* ========== Buttons ========== */
.button-row {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  background: var(--color-focus);
  color: #fff;
  box-shadow: var(--shadow-md);
  transition: transform 0.02s ease, filter 0.2s ease, background 0.2s ease;
}

.button:hover {
  filter: brightness(1.05);
}

.button:active {
  transform: translateY(1px);
}

.button--secondary {
  background: #0f172a;
}

.button--ghost {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.button[disabled] {
  background: var(--color-disabled);
  color: #94a3b8;
  cursor: not-allowed;
}

/* ========== Tel-specific helper ========== */
input[type="tel"] {
  letter-spacing: 0.02em;
}
input[type="tel"]::placeholder {
  color: #9aa4b2;
}
