/* CSS Reset for Button */
button.sefaria-common-button,
a.sefaria-common-button {
    all: unset; /* Resets all properties */
    display: inline-flex; /* Ensure button remains an inline element */
    box-sizing: border-box; /* Ensure padding and border are included in the element's total width and height */
    margin: 0; /* Reset margin */
    padding: 0; /* Reset padding */
    background: none; /* Reset background */
    border: none; /* Reset border */
    color: inherit; /* Inherit text color from parent */
    font: inherit; /* Inherit font properties from parent */
    text-align: center; /* Center text */
    text-decoration: none; /* Remove text decoration */
    cursor: pointer; /* Ensure pointer cursor */
    user-select: none; /* Prevent text selection */
    -webkit-appearance: none; /* Remove default appearance in Webkit browsers */
    -moz-appearance: none; /* Remove default appearance in Mozilla browsers */
    appearance: none; /* Remove default appearance */
}

body.user-is-tabbing button.sefaria-common-button:focus,
body.user-is-tabbing a.sefaria-common-button:focus {
    outline: 2px solid var(--focus-blue);
    outline-offset: 2px;
}

button.sefaria-common-button::-moz-focus-inner,
a.sefaria-common-button::-moz-focus-inner {
    border: 0; /* Remove inner border in Firefox */
    padding: 0; /* Remove inner padding in Firefox */
}
/* end reset */

/* Button Styles */

/** general sized button **/
button.sefaria-common-button,
a.sefaria-common-button {
    background-color: var(--theme-button-background);
    color: var(--theme-button-text);
    border: 1px solid var(--theme-button-border);
    padding: 10px 20px;
    border-radius: 6px;
    height: 39px;
    min-width: 39px;
    width: fit-content;
    height: fit-content;
    text-align: center;
    text-align-last: center;
    cursor: pointer;
    font-size: 16px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    line-height: 1; 
    --english-font: var(--english-sans-serif-font-family);
    --hebrew-font: var(--hebrew-sans-serif-font-family);
}
button.sefaria-common-button.small,
a.sefaria-common-button.small {
    height: 30px;
    min-width: 30px;
    padding: 5px 10px;
    font-size: 14px;
}
/** large button **/
button.sefaria-common-button.large,
a.sefaria-common-button.large {
    height: 53px;
    min-width: 39px;
}
/** full width button **/
button.sefaria-common-button.fullwidth,
a.sefaria-common-button.fullwidth {
    height: 53px;
    width: 100%;
}
/** fillwidth button (alias for fullwidth) **/
button.sefaria-common-button.fillwidth,
a.sefaria-common-button.fillwidth {
    height: 53px;
    width: 100%;
}
/** auto-width-button variant for the signup and create button in the header **/
button.sefaria-common-button.auto-width-button,
a.sefaria-common-button.auto-width-button {
    padding: 6px 12px;
    font-size: 14px;
    white-space: nowrap;
}
/** button children **/
button.sefaria-common-button,
button.sefaria-common-button *,
a.sefaria-common-button,
a.sefaria-common-button *{
  /*extra make sure color is applied to text if its in nested elements  */
    color: var(--theme-button-text);
}
/** button icon **/
button.sefaria-common-button img.button-icon,
a.sefaria-common-button img.button-icon {
    filter: var(--theme-button-icon-filter);
    margin-inline-end: 5px;
    height: 18px;
    vertical-align: -15%;
}

/** icon-only button variant **/
button.icon-only,
a.icon-only {
    width: 18px;
    height: 18px;
    min-width: 18px;
    min-height: 18px;
    padding: 0;
    background: transparent;
    border: none;
    cursor: pointer;
    vertical-align: middle;
    flex-shrink: 0;
}

button.icon-only .button-icon,
a.icon-only .button-icon {
    max-width: 100%;
    max-height: 100%;
    margin-inline-end: 0;
}

