/**
 * Avalara_AvaTax
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Open Software License (OSL 3.0)
 * that is bundled with this package in the file LICENSE.txt.
 * It is also available through the world-wide-web at this URL:
 * http://opensource.org/licenses/osl-3.0.php
 *
 * @copyright  Copyright (c) 2016 Avalara, Inc.
 * @license    http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
 */
@import '_address-validation.less';
@import '_avatax-configuration.less';

.certificates-fieldset-wrapper {
    .fieldset-wrapper-title {
        &:before, &:after {
            display: none;
        }

        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .customer-tax-exemption-actions {
        display: flex;

        .customer-tax-exemption-action {
            margin-left: 20px;
        }
    }
}

.avatax-invite-account-modal {
    .modal-header {
        min-height: 65px;

        .action-close:focus {
            padding: 2.1rem 2.6rem;
        }
    }

    .modal-content .action {
        margin-top: 30px;
    }
}

.admin__avatax-log-summary {
    span {
        float: left;
    }
    .avatax-summary-list {
        float: left;
    }
    .avatax-log-summary-level {
        float: left;
        margin: 0 0 0 2em;
        padding: 0;
    }
    .avatax-log-summary-level-label {
        margin: 0;
        padding-right: 0.5em;
        text-align: right;
        border-right-color: @color-black;
        border-right-style: solid;
        border-right-width: thin;
    }
    .avatax-log-summary-count {
        padding-left: 0.5em;
        margin: 0;
    }
}

pre.admin__avatax-log-text {
    white-space: pre-wrap;
}

// Fix some styling of the tooltip on admin when inside the totals table
.order-subtotal-table {
    .admin__field-tooltip {
        display: inline;
        text-align: left;
        vertical-align: 2px;

        .admin__field-tooltip-action {
            margin-left: 0.5rem;
            color: @color-gray19;
        }
    }
}

.avataxValidateAddressButton, .avataxValidateAddressForm {
    margin-left: 31em;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.avataxValidateAddressForm {
    max-width: 40%;
}

.accordion .config input[type='text'], .accordion .config input[type='password'], .accordion .config select, .accordion .config textarea {
    width:98% !important;
}
.accordion .config .value.with-tooltip {
    font-size: inherit !important;
}
#default-company-text {
    font-weight: bold;
    padding: 5px 0 0 25px;
    position: absolute;
}
.accordion .config .value.with-tooltip .tooltip {
    margin: 6px -22px 0 0 !important;
}

input[id^="tax_avatax_configuration"].admin__control-radio
{
	position: fixed !important;
}

#tax_avatax_configuration-head {
    background: url("Avalara_AvaTax::images/Avalara-Logo-RGB.png") left/auto (@collapsible-title-icon__size + 0.7rem) no-repeat;
    height: 0;
    overflow: hidden;
    padding: (@collapsible-title__padding-top + (@line-height__base + 1rem) + @collapsible-title__padding-bottom) 0 0;
}

.avalogo{
    background: url("Avalara_AvaTax::images/AvaTax.png") left/auto (@collapsible-title-icon__size + 0.7rem) no-repeat;
    padding: 1rem 2.5rem 0.5rem 3rem;
}


#tax_avatax_configuration_address_validation_address_validation_countries_enabled, #tax_avatax_configuration_exemption_certcapture_management_enabled_countries {
    height: 8rem;
}
#row_tax_avatax_configuration_sales_tax_tax_included {
    font-size:1.4rem;
}
//
//  Variables
//  ---------------------------------------------

@search-taxcode-input__font-size: @font-size__base;
@search-taxcode-input__height: @page-header-action__height;

.field-avatax_code, #row_tax_avatax_configuration_sales_tax_shipping_tax_code {
    .search-taxcode-menu {
        border: 1px solid @action-dropdown__active__border-color;
        border-top-color: transparent;
        box-shadow: 1px 2px 5px rgba(0, 0, 0, 0.4);
        left: 0;
        margin-top: -2px;
        max-height: 80vh;
        overflow: auto;
        padding: 0;
        position: absolute;
        right: 0;
        top: 100%;
        word-break: break-word;
        word-wrap: break-word;
        z-index: 2;

        &:after {
            background-color: @action-dropdown__background-color;
            content: '';
            height: @component__shadow-size__base;
            left: 0;
            position: absolute;
            right: 0;
            top: -@component__shadow-size__base;
        }

        > li {
            background-color: @action-dropdown__background-color;
            border-top: 1px solid @action-dropdown__border-color;
            display: block;
            font-size: @font-size__s;
            padding: 7px 15px;
            cursor: pointer;

            &._active {
                background-color: @color-blue-clear-sky;
            }

            a {
                &:hover {
                    color: darken(@text__color, 10%);
                    text-decoration: none;
                }
            }
        }

        .title {
            color: darken(@text__color, 10%);
            display: block;
            font-size: @search-taxcode-input__font-size;
        }

        .description {
            padding-top: 2px;
            display: block;
        }
    }
}

#row_tax_avatax_configuration_sales_tax_shipping_tax_code {
    .mage-suggest {
        border: none;
        &:after {
            content: '';
        }

        //  Autocomplete results
        .autocomplete-results {
            height: @search-taxcode-input__height;
            position: absolute;
            right: 0;
            top: 0;
            width: 100%;
        }
    }
}

.field-avatax_code {
    .mage-suggest {
        //  Autocomplete results
        .autocomplete-results {
            width: 100%;
            display: block;
            position: relative;
        }
    }
}