/* ------------------------------------------------------------------------------
 *
 *  # Phosphor icons base
 *
 *  Base styles for Phosphor. Include font import, class definition and other options
 *
 * ---------------------------------------------------------------------------- */

// Font definition
@font-face {
    font-family: 'Phosphor';
    src:
        url('#{$ph-font-path}/Phosphor.ttf?9jjo3j') format('truetype'),
        url('#{$ph-font-path}/Phosphor.woff?9jjo3j') format('woff'),
        url('#{$ph-font-path}/Phosphor.svg?9jjo3j#Phosphor') format('svg');
    font-weight: normal;
    font-style: normal;
    font-display: block;
}

// Base Class Definition
[class^="#{$ph-css-prefix}-"],
[class*=" #{$ph-css-prefix}-"] {
    /* use !important to prevent issues with browser extensions that change fonts */
    font-family: 'Phosphor' !important;
    speak: never;
    font-style: normal;
    font-weight: normal;
    font-variant: normal;
    text-transform: none;
    line-height: 1;
    font-size: var(--#{$prefix}icon-font-size);
    min-width: 1em;
    display: inline-block;
    vertical-align: calc(calc(50% - var(--#{$prefix}icon-font-size)) * .5);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

// Icon Sizes. 4 additional sizes: .ph-2x -> .ph-5x
@for $i from 1 through 5 {
    .#{$ph-css-prefix}-#{$i}x {
        font-size: calc(#{$i} * var(--#{$prefix}icon-font-size));
    }
}

// Additional sizes
.ph-lg {
    font-size: var(--#{$prefix}icon-font-size-lg);
}
.ph-sm {
    font-size: var(--#{$prefix}icon-font-size-sm);
}



//
// Rotated & Flipped Icons
//

// Rotation
.#{$ph-css-prefix}-rotate-90  { @include ph-icon-rotate(90deg, 1);  }
.#{$ph-css-prefix}-rotate-180 { @include ph-icon-rotate(180deg, 2); }
.#{$ph-css-prefix}-rotate-270 { @include ph-icon-rotate(270deg, 3); }

// Flip
.#{$ph-css-prefix}-flip-horizontal { @include ph-icon-flip(-1, 1, 0); }
.#{$ph-css-prefix}-flip-vertical   { @include ph-icon-flip(1, -1, 2); }
.#{$ph-css-prefix}-flip-horizontal.#{$ph-css-prefix}-flip-vertical { @include ph-icon-flip(-1, -1, 2); }
