/*
 Theme Name:   Robodog GP
 Theme URI:    https://robodog.fi
 Description:  Robodog GeneratePress child theme with extra coolness.
 Author:       Robodog LLC
 Author URI:   https://robodog.fi
 Template:     generatepress
 Version:      2.6
 Text Domain:  robodog-gp
 Domain Path:  /languages
*/
/* ===================================
1. Colors and color switcher
2. Typography 
3. Elements
4. Utility Classes
5. GP Theme & Layout Setup
=================================== */


/* 1. Colors */

/* Dark/Light mode switcher */

html {
    color-scheme: light dark;
}
html.rd-theme--light {
    color-scheme:light;
}
html.rd-theme--dark {
    color-scheme:dark;
}
html, body { background-color: var(--rd-c-bg-base); }

/* Prevent single-button FOUC */
.rd-theme-switcher .rd-theme-toggle { display: none; }

/* Single-button mode: show the action for the opposite theme */
html.rd-theme--light .rd-theme-switcher:not(.rd-theme-switcher--2-buttons) .rd-theme-toggle[data-theme="dark"] { display: inline-flex; }
html.rd-theme--dark  .rd-theme-switcher:not(.rd-theme-switcher--2-buttons) .rd-theme-toggle[data-theme="light"] { display: inline-flex; }

/* Two-icons mode: always show both */
.rd-theme-switcher.rd-theme-switcher--2-buttons .rd-theme-toggle { display: inline-flex; }



  /* 2. Typography */

body {
    color: var(--rd-c-text-base);
    font-family: var(--rd-typography-family-body);
    font-size: var(--rd-typography-size-body);
    -moz-osx-font-smoothing: grayscale;
    -webkit-font-smoothing: antialiased;
    font-weight: var(--rd-typography-weight-body);
    line-height: var(--rd-typography-line-height-body);
    text-rendering: geometricPrecision;
}


p, ul, ol {    
    margin-bottom:var(--rd-typography-margin-bottom-body);
}

p:last-child {
  margin-bottom: 0;
}

b, strong {
  font-weight: var(--rd-typography-weight-bold);
}

em, i {
  font-style: italic;
}

  button,
  input,
  optgroup,
  select,
  textarea {
    font-family: inherit;
  }


 /* Headings  */

  h1, h2, h3, h4, h5, h6, .rd-heading-h1, .rd-heading-h2, .rd-heading-h3,.rd-heading-h4,.rd-heading-h5, .rd-heading-h6 {
    color:var(--rd-c-text-heading);
    font-family: var(--rd-typography-family-heading);
    line-height: var(--rd-typography-line-height-heading);
    margin-bottom:var(--rd-typography-margin-bottom-heading);
    margin-top: var(--rd-typography-margin-top-heading);
    hyphens: auto;
    max-width:100%;
}

.rd-heading--hero-3, .rd-heading--hero-2, .rd-heading--hero-1 {
    line-height: var(--rd-typography-line-height-hero);
    font-family: var(--rd-typography-family-hero);
    font-weight: var(--rd-typography-weight-hero);
}
h1 a, h2 a, h3 a, h4 a, h5 a, h6 a {
    text-decoration: none
}

.rd-heading--hero-3 {
    font-size: var(--rd-fs-1200);
}
.rd-heading--hero-2 {
    font-size: var(--rd-fs-1100);
}
.rd-heading--hero-1 {
    font-size: var(--rd-fs-1000);
}
h1, .rd-heading--h1 {
    font-size: var(--rd-fs-900);
}
h2, .rd-heading--h2 {
    font-size: var(--rd-fs-800);
}
h3, .rd-heading--h3 {
    font-size: var(--rd-fs-700);
}
h4, .rd-heading--h4 {
    font-size: var(--rd-fs-600);
}
h5, .rd-heading--h5 {
    font-size: var(--rd-fs-500);
}
h6, .rd-heading--h6 {
    font-size: var(--rd-fs-400);
}

h1:first-child,
h2:first-child,
h3:first-child,
h4:first-child,
h5:first-child,
h6:first-child {
  margin-top: 0;
}

h1:last-child,
h2:last-child,
h3:last-child,
h4:last-child,
h5:last-child,
h6:last-child {
  margin-bottom: 0;
}

/* 3. ELEMENTS */

button {
    border-radius:var(--rd-radius-button) 
}

/* Quotes */
blockquote {
    border-left:var(--rd-border-width-thick, 4px)  solid var(--rd-base-500);
    font-style:italic;
    padding:var(--rd-space-m);
}
cite {
font-size: var(--rd-fs-300);
font-style:normal;
font-weight: bold;
}

cite::before {
    content: "— ";
}

/* Images */

#content img {
    display: inline-block;
    vertical-align: middle;
    max-width: 100%;
}

/* Lists */

ul li ul {
    list-style-type: circle;
}
ul li ul li ul {
    list-style-type: square;
}

/* Tables - use .rd-table */

.rd-table, .rd-table table, .rd-table td, .rd-table th {
    border:0;
}

.rd-table table, .rd-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: var(--rd-space-s);
    border-radius: var(--rd-br-s);
    overflow: hidden;
}

.rd-table :where(th, td) {
    padding: var(--rd-space-xs);
    text-align: left;
    border-left:0;
    border-right: 0;
}

.rd-table :where(thead)  {
    background: var(--rd-base-800);
    border-bottom: 0;
}

.rd-table th {
    color: var(--rd-base-100);
    font-weight: bold;
    text-transform: uppercase;
    font-size: var(--rd-fs-300);
    letter-spacing: 0.05em;
}

.rd-table tr:last-child td {
    border-bottom: none;
}

.rd-table tr:hover td {
    background-color: var(--rd-c-overlay-soft);
}

/* Forms - use rd-form */

/* Starter Theme (global) — Form controls */
.rd-form :where(input[type="text"],
input[type="email"],
input[type="url"],
input[type="tel"],
input[type="password"],
input[type="search"],
input[type="number"],
select,
textarea) {
  appearance: none;
  background-color: var(--rd-form-bg);
  border: var(--rd-border-width-default) solid var(--rd-form-border);
  color: var(--rd-c-text-base);
  border-radius: var(--rd-radius-default);
  padding: var(--rd-padding-s) var(--rd-padding-m);
  line-height: 1.4;
  width: 100%;
}

/* Placeholder color (all engines) */
.rd-form :where(input::placeholder,
textarea::placeholder) { color: var(--rd-form-placeholder); opacity: 1; }

/* Focus: keep it simple; rely on border + global outline tokens */
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--rd-form-border-focus);
  outline: var(--rd-focus-outline-width) solid var(--rd-focus-outline-color);
  outline-offset: var(--rd-focus-outline-offset);
}

/* Disabled/read-only */
.rd-form :where(iinput[disabled],
select[disabled],
textarea[disabled],
input[readonly],
textarea[readonly]) {
  opacity: 0.7;
  cursor: not-allowed;
}


/* 4. UTILITY CLASSES */

/* Aspect Ratios */

.ar, .ar--16-9, .ar--9-16, .ar--4-3, .ar--1-1, .ar--mobile-1-1-desktop-16-9 {
    object-fit: cover;
}
.ar--16-9 {aspect-ratio: 16/9}
.ar--9-16 {aspect-ratio: 9/16}
.ar--4-3 {aspect-ratio: 4/3}
.ar--1-1 {aspect-ratio: 1/1}

/* Line Limits */

.rd-line-clamp-3, .rd-line-clamp-2 {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.rd-line-clamp-3 {
	-webkit-line-clamp: 3;
    line-clamp: 3;
}

.rd-line-clamp-2  {
	-webkit-line-clamp: 2;
    line-clamp: 2;
}

/* Screenreader texts */

.screen-reader-text {
  border: 0;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  width: 1px;
  word-wrap: normal !important;
}
.screen-reader-text:focus {
  opacity: 0;
}
.screen-reader-text:focus-visible {
  background-color: var(--rd-c-surface-base);
  border-radius: 0;
  clip: auto;
  clip-path: none;
  display: block;
  font-size: 1.0625rem;
  height: auto;
  left: 0.3125rem;
  line-height: normal;
  opacity: 1;
  padding: 0.9375rem 1.4375rem 0.875rem;
  text-decoration: none;
  top: 0.3125rem;
  width: auto;
  z-index: 100000;
}

/* Default transition */
.rd-transition {
    transition: all var(--rd-time-default, .25s) var(--rd-ease, ease-in-out);
}

/* Default shadows for cards etc. */
.rd-shadow {box-shadow: var(--rd-shadow-default);}
.rd-shadow-s {box-shadow: var(--rd-shadow-s);}
.rd-shadow-l {box-shadow: var(--rd-shadow-l);}

/* Full Width Container Helper */
.rd-remove-content-padding {
  margin-left: calc(-1 * var(--rd-spacing-content-padding)) !important;
  margin-right: calc(-1 * var(--rd-spacing-content-padding)) !important;
}

/* Slide link height and color */
/* Slide underline effect for links */
/* Adjust width and color in site-specific-style.css */

a.rd-slide-ul, .rd-slide-ul a {
    text-decoration: none;
    position: relative;
}

a.rd-slide-ul:before, .rd-slide-ul a:before {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0) !important;
}

a.rd-slide-ul:hover:before, .rd-slide-ul a:hover:before {
    transform: scaleX(1) !important;
    transform-origin: bottom left !important;
}

/* Accessibility fix for slide-underline links */
a.rd-slide-ul:focus-visible,
.rd-slide-ul a:focus-visible {
  outline: var(--rd-focus-outline-width, 2px) solid var(--rd-focus-outline-color, var(--rd-c-primary)); /* visible keyboard focus */
  outline-offset: var(--rd-focus-outline-offset, 3px); /* keep some space from text */
}

a.rd-slide-ul:focus-visible:before,
.rd-slide-ul a:focus-visible:before {
  transform: scaleX(1) !important;   /* show underline immediately */
  transform-origin: bottom left !important;
}

/* Container links */

.rd-stretch-link{
	position: relative;
}

.rd-stretch-link a::after{
	content: '';
	position: absolute;
	inset: 0;
}

.rd-stretch-link a:is(:hover, :focus){
	outline: none;
}

.rd-stretch-link a:is(:focus-visible)::after{
	outline: var(--rd-focus-outline-width, 2px) solid var(--rd-focus-outline-color, var(--rd-c-primary));
}
.rd-card.rd-stretch-link a:is(:focus-visible)::after{
    border-radius: var(--rd-radius-card, var(--rd-br-m));
}


/* 5. THEME LAYOUT SETUP */

/* Sections, Content & Containers */


/* GP Elements default sizing & padding */

.separate-containers .inside-article,
.separate-containers .comments-area,
.separate-containers .page-header,
.separate-containers .paging-navigation,
.one-container .site-content,
.rd-site-header
{
    padding-inline: var(--rd-spacing-content-padding);
}

/* Default article */

.rd-article-content :is(
  h1, h2, h3, h4, h5, h6,
  p, blockquote, pre, hr,
  ul, ol, li,
  dl, dt, dd,
  table, thead, tbody, tfoot, tr, td, th,
  address,
  a, strong, b, em, i, code, kbd, samp,
  mark, abbr, cite, dfn, var, time, small, sub, sup, span
) {
    max-width: var(--rd-article-content-width);
    margin-inline: auto;
}

/* Restore indent for lists */
.rd-article-content ul,
.rd-article-content ol {
  padding-inline-start: 1.5em; 
}
/* Article content bottom default padding */
.rd-article-content img:not(figure img), .rd-article-content figure {
    margin-bottom:var(--rd-typography-margin-bottom-heading);
}

/* Section controls padding, section inner container width of the content */

.rd-section, .rd-section--xs, .rd-section--s, .rd-section--m, .rd-section--default, .rd-section--l, .rd-section--xl  {
    padding-inline: var(--rd-spacing-content-padding);
}

.rd-section {
    padding-block:0;
}

.rd-section--s {
    padding-block:var(--rd-spacing-section-gap-s);
}

.rd-section--m {
    padding-block:var(--rd-spacing-section-gap-m);
}

.rd-section--l {
     padding-block:var(--rd-spacing-section-gap-l);
}

.rd-section--xl {
     padding-block:var(--rd-spacing-section-gap-xl);
}


.rd-section__container, .rd-section__container--default, .rd-section__container--wide, .rd-section__container--narrow, .rd-section__container--extra-narrow {
    margin-inline: auto
}

.rd-section__container--default {
    max-width:min(100%, var(--rd-main-container-width))
}

.rd-section__container--wide {
    max-width:min(100%, var(--rd-main-container-width-wide))
}

.rd-section__container--narrow {
    max-width:min(100%, var(--rd-main-container-width-narrow))
}

.rd-section__container--extra-narrow {
    max-width:min(100%, var(--rd-main-container-width-extra-narrow))
}

/* Logo switcher block 
*  In Woo/other plugin conflicts set logo height in logo wrapper height */

.rd-site-logo-wrapper { 
  display: block; 
}

/* WOO fix: .woocommerce img rule */
.rd-site-logo-wrapper :is(img, a > img, picture img) {
  display: block;
  height: 100%;        /* take the wrapper's computed height */
  width: auto;         /* preserve aspect ratio */
  object-fit: contain; /* or 'scale-down' if preferred */
}