/*
*
* @copyright Copyright (c) Open-Xchange GmbH, Germany <info@open-xchange.com>
* @license AGPL-3.0
*
* This code 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, either version 3 of the License, or
* (at your option) any later version.

* 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 OX App Suite. If not, see <https://www.gnu.org/licenses/agpl-3.0.txt>.
*
* Any use of the work other than as authorized under this license or copyright law is prohibited.
*
*/

// smart dropdowns have an index of 100000, so we must be higher
.wizard-container { display: flex; z-index: 100003;}

.wizard-step {
    font-size: 14px;
    background-color: white;
    outline: 0;
    z-index: 1000;
    position: absolute;

    // default width
    width: 400px;

    box-shadow: 0 10px 20px 0px rgba(0, 0, 0, 0.30);

    &.center {
        position: static;
        margin: 0 auto;
    }

    &.middle {
        position: static;
        align-self: center;
    }

    .wizard-title {
        font-size: 16px;
        font-weight: bold;
        padding: 24px 16px 0 16px;
        margin: 0 32px 0 0;
        &:empty { display: none; }
    }

    .wizard-header {
        position: relative;
    }

    .wizard-close {
        position: absolute;
        width: 40px;
        height: 48px;
        line-height: 48px;
        top: 8px;
        right: 8px;
        outline: 0;

        &:focus {
            color: #333;
            background-color: #ccc;
        }
    }

    .wizard-content { padding: 24px 16px; }

    .wizard-footer {
        padding: 0 16px 16px 16px;
        font-weight: bold;
        text-align: right;

        &:empty { display: none; }

        .btn { margin-left: 8px; }

        .wizard-step-number {
            text-align: center;
            line-height: 30px;
            font-weight: normal;
            // yes height 0 and display block. a bit hacky but this makes it work with 1 or 2 buttons
            height: 0px;
            display: block;
        }
    }
}

.wizard-overlay {
    background-color: @wizard-backdrop-color;
    z-index: 100001;
}

.wizard-backdrop {
    background-color: @wizard-backdrop-color;
    z-index: 100001;
}

.wizard-spotlight {
    background-color: rgba(255, 255, 255, 0.01);
    box-shadow: 0 10px 50px 0px rgba(0, 0, 0, 0.40);
    z-index: 100002;
}

//
// Smartphone support
//

.smartphone {

    .wizard-container {
        background-color: #f5f5f5;
        z-index: 1000;
        overflow: hidden;
        display: block;
    }

    .wizard-navbar {
        position: absolute;
        width: 100%;
        height: 48px;
        border-bottom: 1px solid #ccc;
        background-color: #fff;
        text-align: center;
        line-height: 48px;
        display: table;
        table-layout: fixed;
        -webkit-touch-callout: none;

        a:active, a:focus {
            opacity: 0.50;
            text-decoration: none;
        }

        a[disabled] {
            color: #aaa;
            pointer-events: none;
        }
    }

    .wizard-title, .wizard-back, .wizard-next {
        display: table-cell;
        width: 50%; // yep 50
        white-space: nowrap;
    }

    .wizard-title {
        font-weight: bold;
        text-align: center;
        .ellipsis();
    }

    .wizard-back {
        text-align: left;
        padding: 0 8px 0 16px;
    }

    .wizard-next {
        text-align: right;
        padding: 0 16px 0 8px;
    }

    .wizard-pages {
        position: absolute;
        width: 100%;
        top: 49px;
        bottom: 0;
    }

    .wizard-animation { display: none; }

    .wizard-step {
        font-size: 16px;
        top: 0;
        left: 0;
        transform: translate3d(0, 0, 0);
        height: 100%;
        width: 100%;
        padding-top: 40px;
        text-align: center;
        overflow: hidden;
        box-shadow: none;
        background-color: transparent;
    }
}
