/*
Theme Name: LDN AB
Theme URI: https://github.com/Ratt-Grafiska/ldn-2025
Author: Johan Wistbacka
Author URI: https://rattgrafiska.se
Description: 
Requires at least: 6.8
Tested up to: 6.8
Requires PHP: 7.2
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ldn-ab
Tags: En kolumn, Anpassade färger, custom-menu, Anpassad logga, Stilmall för redigerare, Utvalda bilder, Webbplatsredigerare, Mönster i blockredigeraren, rtl-language-support, Klistrat inlägg, threaded-comments, translation-ready, Breda block, Stilar i blockredigeraren, Stilvarianter, Tillgänglighetsanpassat, Blogg, Portfölj, Nyheter

/*
 * Scroll styles
 */
html,
section {
  scroll-behavior: smooth;
}
/*
 * Link styles
 * https://github.com/WordPress/gutenberg/issues/42319
 */
a {
  text-decoration-thickness: 1px !important;
  text-underline-offset: 0.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,
.pretty {
  text-wrap: pretty;
}
.balance {
  text-wrap: balance;
}

/*
 * 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;
}

/* === Fokus-styling för tillgänglighet === */
:where(.wp-site-blocks *:focus) {
  outline-width: 2px;
  outline-style: solid;
}

/* === Flex-wrap för kolumner vid olika skärmbredder === */
@media (max-width: 1280px) {
  .wide-size-break {
    flex-wrap: wrap !important;
  }
  .wide-size-break > .wp-block-column {
    flex-basis: 100% !important;
  }
}
@media (max-width: 640px) {
  .small-size-break {
    flex-wrap: wrap !important;
  }
  .small-size-break > .wp-block-column {
    flex-basis: 100% !important;
  }
}
/* === Kontaktformulär – Styling === */
.contact-form {
  max-width: 600px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  line-height: 1.6;
}

.contact-form h2 {
  text-align: center;
  font-size: 1.8em;
  margin-bottom: 1em;
}

.contact-form p {
  text-align: center;
  margin-bottom: 2em;
  color: #666;
}

.form-group {
  margin-bottom: 1.5em;
}

.form-group label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
  color: #333;
}

.form-group .required {
  color: var(--wp--preset--color--base);
  font-size: 0.9em;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form input[type="tel"],
.contact-form input[type="date"],
.contact-form textarea {
  width: 100%;
  padding: 0.75em;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
}

.contact-form textarea {
  resize: vertical;
}

.contact-form input[type="text"]:focus,
.contact-form input[type="email"]:focus,
.contact-form input[type="tel"]:focus,
.contact-form input[type="date"]:focus,
.contact-form textarea:focus {
  border-color: var(--wp--preset--color--base);
  box-shadow: 0 0 3px rgba(0, 123, 255, 0.25);
  outline: none;
}

.contact-form input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 0.75em;
  font-size: 1em;
  font-weight: bold;
  color: var(--wp--preset--color--base);
  background-color: var(--wp--preset--color--contrast);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}
.contact-form input[type="submit"]:hover {
  color: var(--wp--preset--color--contrast);
  background-color: var(--wp--preset--color--base);
  border: none;
  border-radius: 0.25em;
}

/* Grundläggande form-layout */
.wpcf7 form {
  max-width: 600px;
  margin: 0 auto;
  font-family: Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

/* Rubriker och beskrivningar */
.wpcf7 form h2 {
  text-align: center;
  font-size: 1.8rem;
  margin-bottom: 1em;
}

.wpcf7 form p {
  margin-bottom: 1em;
}

/* Etiketter */
.wpcf7 form label {
  display: block;
  font-weight: bold;
  margin-bottom: 0.5em;
}

/* Input och textarea */
.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea,
.wpcf7 select {
  width: 100%;
  padding: 0.75em;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  margin-bottom: 1.5em;
}

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

/* Fokus-effekt */
.wpcf7 input:focus,
.wpcf7 textarea:focus,
.wpcf7 select:focus {
  border-color: var(--wp--preset--color--base);
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
  outline: none;
}

/* Checkbox och radio - inline snyggt */
.wpcf7-checkbox label,
.wpcf7-radio label {
  display: inline-block;
  margin-right: 1em;
  font-weight: normal;
}

/* Skicka-knapp */
.wpcf7 input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 0.75em;
  font-size: 1rem;
  font-weight: bold;
  color: #fff;
  background-color: var(--wp--preset--color--base);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-transform: uppercase;
  transition: background-color 0.3s ease;
}

.wpcf7 input[type="submit"]:hover {
  background-color: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base);
  border-radius: 0.25em;
}

.wpcf7-list-item {
  width: 50%;
}

/* Meddelande efter skickat */
.wpcf7-response-output {
  margin-top: 1em;
  padding: 1em;
  border: 2px solid #ccc;
  border-radius: 4px;
  background: #f9f9f9;
}

/* Styling för list-item (checkboxar och radio) */
/* Grundläggande styling för list-item */
.wpcf7-list-item {
  display: block;
  margin-bottom: 0.5em;
}

/* Två kolumner på desktop */
@media (min-width: 768px) {
  .wpcf7-checkbox {
    display: flex;
    flex-wrap: wrap;
    gap: 1em; /* Lite mellanrum mellan kolumnerna */
  }
  .wpcf7-list-item {
    width: 48%; /* Två kolumner */
    margin: 0 0 1em 0;
  }
}
/* Större klickyta och tydligare input */
.wpcf7-list-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
}

.wpcf7-list-item input[type="checkbox"] {
  margin-right: 0.5em;
  transform: scale(1.1);
}

/* Öka klickytan och tydliggör val */
.wpcf7-list-item label {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: normal; /* Inte fet stil */
}

/* Avstånd mellan ruta och text */
.wpcf7-list-item input[type="checkbox"],
.wpcf7-list-item input[type="radio"] {
  margin-right: 0.5em;
  transform: scale(1.2); /* Gör boxarna lite större */
}

.wpcf7-list-item label {
  padding: 0.2em;
}
.wpcf7-list-item label:hover {
  background: #f9f9f9;
  border-radius: 4px;
  padding: 0.2em;
}
