/*
 * RERO angular core
 * Copyright (C) 2024-2025 RERO
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, version 3 of the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

@import "./variables";

a {
  @apply ui:no-underline;
 }

a:not(.p-button):not(.p-ripple):not([role=button]):not([role=tab]) {
  color: var(--p-primary-500);
}

a:hover:not(.p-button):not(.p-ripple):not([role=button]):not([role=tab]) {
  color: var(--p-primary-600);
  @apply ui:text-primary-600 ui:underline;
}

// Force links in tag elements to keep the color defined by the tag
p-tag a {
  color: inherit!important;
}

dl.metadata {
  @apply ui:grid ui:grid-cols-4;
  dt {
    @apply ui:font-bold ui:mr-2;
  }
  dd {
    @apply ui:col-span-3;
  }
}

// CALLOUT
.callout {
  border: 1px solid var(--p-surface-300);
  border-left: 5px solid var(--p-surface-300);
  border-radius: 5px;
}

@each $variant in $callout-variants {
  .callout-#{$variant} {
    border: 1px solid rgba(var(--callout-color-#{$variant}), 0.3);
    border-left: 5px solid rgb(var(--callout-color-#{$variant}));
  }

  .callout-bg-#{$variant} {
    background-color: rgba(var(--callout-color-#{$variant}), 0.05);
  }
}
