/* Decorative action symbols: labels, CMS blocks and native form handlers stay
   intact. Class/URL selectors also cover controls created after page load. */
:root {
  --action-icon-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 5.5C9.4 3.8 6.1 3.3 3 4v15c3.1-.7 6.4-.2 9 1.5 2.6-1.7 5.9-2.2 9-1.5V4c-3.1-.7-6.4-.2-9 1.5Zm0 0v15'/%3E%3C/svg%3E");
  --action-icon-calendar: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='2'/%3E%3Cpath d='M7 3v4m10-4v4M3 10h18m-13 5 3 3 5-5'/%3E%3C/svg%3E");
  --action-icon-mail: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='14' rx='2'/%3E%3Cpath d='m3 7 9 6 9-6'/%3E%3C/svg%3E");
  --action-icon-write: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4H5a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2h13a2 2 0 0 0 2-2v-7M16 3l5 5M9 15l-1 4 4-1L22 8a2 2 0 0 0 0-3l-2-2a2 2 0 0 0-3 0Z'/%3E%3C/svg%3E");
  --action-icon-send: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21 3-7 18-4-7-7-4 18-7ZM10 14 21 3'/%3E%3C/svg%3E");
  --action-icon-upload: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 16V3m-5 5 5-5 5 5M4 15v5a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-5'/%3E%3C/svg%3E");
  --action-icon-contact: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 11.5a8.5 8.5 0 0 1-8.5 8.5H4l-1 1V11.5a9 9 0 1 1 18 0ZM7 9h10M7 13h7'/%3E%3C/svg%3E");
  --action-icon-certificate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14 3H5a1 1 0 0 0-1 1v16a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1V9l-6-6Zm0 0v6h6M8 15l3 3 5-5'/%3E%3C/svg%3E");
  --action-icon-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='8' y='8' width='13' height='13' rx='2'/%3E%3Cpath d='M16 8V5a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h3'/%3E%3C/svg%3E");
  --action-icon-print: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 8V3h10v5M7 17H4a1 1 0 0 1-1-1v-6a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a1 1 0 0 1-1 1h-3M7 14h10v7H7Zm10-3h1'/%3E%3C/svg%3E");
  --action-icon-original: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M10 4H5a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h14a1 1 0 0 0 1-1v-5M14 3h7v7m0-7L10 14'/%3E%3C/svg%3E");
  --action-icon-next: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16m-6-6 6 6-6 6'/%3E%3C/svg%3E");
}

/* The default arrow is useful for a new CMS call to action; known action
   families receive a specific symbol independently of their translated copy. */
a:is(.action-button, .wp-block-button__link), .booking-next, .fcal_spot_confirm { --action-icon: var(--action-icon-next); }
a:is(.action-button, .wp-block-button__link)[href*="/apie"],
a:is(.action-button, .wp-block-button__link)[href*="/about"],
.post-card-footer > a, .review-story-open { --action-icon: var(--action-icon-book); }
a:is(.action-button, .wp-block-button__link)[href*="/service-page/"],
a:is(.action-button, .wp-block-button__link)[href*="/nemokama-konsultacija"],
a:is(.action-button, .wp-block-button__link)[href*="/free-consultation"],
.fcal_btn_submit, .booking-server-trigger { --action-icon: var(--action-icon-calendar); }
a:is(.action-button, .wp-block-button__link)[href*="/kontaktai"],
a:is(.action-button, .wp-block-button__link)[href*="/contact"] { --action-icon: var(--action-icon-contact); }
.site-form button[type=submit] { --action-icon: var(--action-icon-send); }
.subscription-form button[type=submit] { --action-icon: var(--action-icon-mail); }
.review-open { --action-icon: var(--action-icon-write); }
.contact button[type=submit], .article-comment-form button[type=submit], .glsr-button { --action-icon: var(--action-icon-send); }
.review-file-picker > span { --action-icon: var(--action-icon-upload); }
.gallery-open { --action-icon: var(--action-icon-certificate); }
.share-copy { --action-icon: var(--action-icon-copy); }
.share-print { --action-icon: var(--action-icon-print); }

:is(
  a.action-button, a.wp-block-button__link, .booking-server-trigger, .site-form button[type=submit],
  .review-open, .review-story-open, .post-card-footer > a,
  .article-comment-form button[type=submit], .glsr-button,
  .review-file-picker > span, .gallery-open, .gallery-original,
  .booking-next, .fcal_spot_confirm, .fcal_btn_submit
):not([hidden]) {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--icon-gap);
}
:is(
  a.action-button, a.wp-block-button__link, .booking-server-trigger, .site-form button[type=submit],
  .review-open, .review-story-open, .post-card-footer > a,
  .article-comment-form button[type=submit], .glsr-button,
  .review-file-picker > span, .gallery-open,
  .booking-next, .fcal_spot_confirm, .fcal_btn_submit
)::before {
  content: ''; display: inline-block; flex: 0 0 1.1em; width: 1.1em; height: 1.1em;
  background-color: currentColor; pointer-events: none;
  -webkit-mask: var(--action-icon, var(--action-icon-next)) center / contain no-repeat;
  mask: var(--action-icon, var(--action-icon-next)) center / contain no-repeat;
}
.menu-icon {display:inline-block;width:1.1em;height:1.1em;margin-inline-end:.45em;vertical-align:-.15em;pointer-events:none}
.menu-icon path {transform-origin:12px 12px;transition:transform 180ms ease,opacity 180ms ease}
.primary-navigation[open] > .menu-toggle .menu-icon path:first-child {transform:rotate(45deg) translateY(6px)}
.primary-navigation[open] > .menu-toggle .menu-icon path:nth-child(2) {opacity:0}
.primary-navigation[open] > .menu-toggle .menu-icon path:last-child {transform:rotate(-45deg) translateY(-6px)}
.post-card .post-card-footer > a:not([hidden]) { display: flex; justify-content: flex-start; }
.review-dialog .glsr-default button.glsr-button { white-space: normal; }
/* Loading feedback belongs to the native plugin. */
.glsr-default button.glsr-button[aria-busy=true]::before { content: none; }

.pagination-direction {
  display: block; width: 20px; height: 20px; background: currentColor;
  -webkit-mask: var(--action-icon-next) center / contain no-repeat;
  mask: var(--action-icon-next) center / contain no-repeat;
}
.pagination .prev .pagination-direction { transform: scaleX(-1); }

.gallery-open, .share button, .article-comment-form button {
  transition: background-color var(--interaction-duration) var(--interaction-ease), border-color var(--interaction-duration) var(--interaction-ease), color var(--interaction-duration) var(--interaction-ease);
}
.share button:hover { color: var(--link-hover); text-decoration-thickness: var(--link-underline-active-width); }
@media (forced-colors: active) {
  :is(a.action-button, a.wp-block-button__link, .booking-server-trigger, .site-form button[type=submit], .review-open, .review-story-open, .post-card-footer > a, .article-comment-form button[type=submit], .glsr-button, .review-file-picker > span, .gallery-open, .booking-next, .fcal_spot_confirm, .fcal_btn_submit)::before,
  .pagination-direction { forced-color-adjust: none; background-color: CanvasText; }
  .pagination > .current { forced-color-adjust: none; background: Highlight; border-color: Highlight; color: HighlightText; }
}
@media (prefers-reduced-motion: reduce) {
  .gallery-open, .share button, .article-comment-form button, .menu-icon path { transition: none; }
}

/* One marker for text links that open a new tab; brand/share images retain their own symbols. */
a[target="_blank"]:not(:has(img, svg))::after {
  content: ''; display: inline-block; flex: 0 0 1em; width: 1em; height: 1em;
  margin-inline-start: .4em; vertical-align: -.15em; background: currentColor;
  -webkit-mask: var(--action-icon-original) center / contain no-repeat;
  mask: var(--action-icon-original) center / contain no-repeat;
}
a:is(.about-document-link, .gallery-original)[target="_blank"]::after { margin-inline-start: 0; }
@media (forced-colors: active) {
  a[target="_blank"]:not(:has(img, svg))::after { forced-color-adjust: none; background: LinkText; }
}
