/*
*
* @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.
*
*/

@size: 7.5rem;

.contact-edit {

    margin: 32px 0;

    .form-group {
        margin-bottom: 8px;
    }

    .contact-header {
        height: @size;
        margin-bottom: 32px;
    }

    .height-100 {
        height: 100%;
    }

    label {
        color: #333;
        &.control-label { padding-top: 7px; }
    }

    input, select {
        height: 2rem;
    }

    textarea {
        min-height: 120px;
    }

    .section, fieldset {
        margin-bottom: 32px;
    }

    .section-title {
        font-weight: 500;
        line-height: 32px;
        color: #707070;
    }

    .dropdown[data-add] button,
    .fileupload[data-add] button
     {
        color: #555;
        min-height: 32px;
        .fa-plus-circle {
            color: #4b7916;
            font-size: 20px;
            margin-right: 8px;
            position: relative;
            top: 2px;
        }
    }

    button.remove {
        padding: 0;
        outline: 0;
        .fa-minus-circle {
            color: #a00;
            font-size: 20px;
            position: relative;
            top: 5px;
        }
        &:hover, &:focus {
            .fa-minus-circle {
                color: #333;
            }
        }
    }

    // more space for the day field etc
    .native-date-picker div {
        &:first-child { padding-right: 8px; }
        &:last-child { padding-left: 8px; }
    }
}

.contact-photo-upload {

    .contact-photo {

        width: @size;
        height: @size;
        background-repeat: no-repeat;
        background-size: cover;
        border-radius: 50%;
        /* border: 3px solid white; */
        box-shadow: 0 0 3px #000, 0 0 0px 3px white inset;
        float: right;

        /* click to add photo */
        padding: 8px;
        font-size: 14px;
        color: #555;
        display: flex;
        align-items: center;
        text-align: center;
        background-color: #f5f5f5;
        cursor: pointer;
        position: relative;

        label {
            margin: 0;
            font-weight: normal;
            line-height: 16px;
            cursor: pointer;
        }

        &.focus {
            border: 1px solid @link-color;
            box-shadow: 0 0 8px 2px @link-color, 0 0 0px 2px white inset;
        }
    }

    button.remove {
        font-size: 18px;
        position: absolute;
        bottom: -0.25rem;
        right: @size + 0.25rem;
        outline: 0;
    }

    form {
        position: absolute;
        z-index: 1;
    }

    input[type=file] {
        position: absolute;
        top: 0;
        width: @size;
        height: @size;
        opacity: 0;
        cursor: pointer;
        right: 16px;
    }
}

.contact-edit-add {
    display: inline-block;
    float: right;
    select {
        height: 32px;
        min-width: 240px;
    }
}

@media (max-width: @smartphone-breakpoint) {

    @size: 72px;

    .contact-edit {

        margin-left: 15px;
        margin-right: 15px;

        .contact-header {
            height: @size;
            margin-bottom: 16px;
        }

        h1 {
            font-size: 22px;
            margin: 0;
        }

        label.control-label {
            padding-top: 9px;
            margin-bottom: 3px;
        }

        button.remove {
            .fa-minus-circle {
                color: #a00;
                font-size: 22px;
                position: relative;
                top: 4px;
            }
        }

        .dropdown[data-add] button {
            padding: 4px;
        }
    }

    .contact-photo-upload {
        .contact-photo {
            width: @size;
            height: @size;
            float: none;
            border: 0;
            box-shadow: none;
        }
        button.remove {
            font-size: 14px;
        }
    }
}
