/**
 * @package     Frontline WebApp Base
 *
 * @subpackage  <Application CSS file>
 *
 * @author      Andra Ungureanu <andra@frontline.ro>, Cosmin Ilisescu <cosmin@frontline.ro>
 * @copyright   2017-2020 Frontline softworks <https://www.frontline.ro>
 * @license     https://opensource.org/licenses/BSD-3-Clause
 *
 * @description The purpose of this file is to instantiate custom CSS styling for this Application.
 *
 * @since       2020.08.05
 *
 */

:root {
    --main-bg-color: #3c4b64;
    --second-bg-color: #ced2d8;

    /* Buttons */
    --pry-btn-disabled: #2c3e50;

    /* Sessions */
    --session-bg-color: #def3d1;
    --session-badge-color: #7ccd45;
    --session-shadow-color: rgba(0, 0, 0, .2);

    /* Events */
    --event-bg-color: #d7ebfc;
    --event-badge-color: #4facf2;
    --event-shadow-color: rgba(0, 0, 0, .2);
}

/* Dashboard */
.dashboard-chart-container .dashboard-date-range-filter {
    position: relative;
    width: 300px;
}

.dashboard-chart-container .dashboard-date-range-filter input {
    border: 1px solid rgba(0, 0, 0, .1) !important;
    cursor: pointer !important;
}

.dashboard-chart-container .card-chart-error {
    padding: 25px;
    text-align: center;
}

.dashboard-chart-container hr {
    margin: 25px 0;
    border-color: rgba(0, 0, 0, .1);
}

.dashboard-chart-container .box-chart {
    position: relative;
    margin-bottom: 25px;
    padding: 10px;
}

.dashboard-chart-container .box-chart,
.dashboard-chart-container .card-chart-error {
    background: rgba(0, 0, 0, .02);
    box-shadow: 0 1px 2px rgba(0, 0, 0, .2);
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, .06);
}

.dashboard-chart-container .box-chart .chart-title {
    font-size: 20px;
    text-align: center;
}

.dashboard-chart-container .chart-container {
    margin-top: 25px;
}

/* Calendar */
.fc .fc-view-harness-active {
    box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}

.fc .fc-button-primary {
    background-color: var(--second-bg-color);
    border-color: var(--second-bg-color);
    color: var(--main-bg-color);
    border-radius: 0;
    text-transform: uppercase;
    padding: .75rem 1.5rem;
    font-size: .8rem;
    font-weight: 600;
}

.fc .fc-button-primary:disabled {
    background-color: var(--pry-btn-disabled);
    border-color: var(--pry-btn-disabled);
}

.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:not(:disabled):active {
    background-color: var(--pry-btn-disabled);
    border-color: var(--pry-btn-disabled);
}

.fc .fc-button-primary:focus,
.fc .fc-button-primary:not(:disabled).fc-button-active:focus,
.fc .fc-button-primary:not(:disabled):active:focus {
    box-shadow: 0 0 0 .2rem var(--pry-btn-fcs-shadow);
}

.fc .fc-button-primary:first-child {
    border-top-left-radius: 4px;
    border-bottom-left-radius: 4px;
}

.fc .fc-today-button {
    border-radius: 4px;
}

.fc .fc-button-primary:last-child {
    border-top-right-radius: 4px;
    border-bottom-right-radius: 4px;
}

.fc .fc-button-primary:hover,
.fc .fc-button-primary:not(:disabled).fc-button-active {
    background-color: var(--main-bg-color);
    border-color: var(--main-bg-color);
}

.fc .fc-col-header-cell {
    text-transform: uppercase;
    font-weight: 500;
}

.fc .fc-toolbar-title {
    text-transform: uppercase;
}

.fc .fc-timeGridDay-view .calendar-session,
.fc .fc-timeGridWeek-view .calendar-session {
    background-color: var(--session-bg-color);
    border: none;
    box-shadow: -4px 0 var(--session-badge-color), 0 2px 4px var(--session-shadow-color);
    border-radius: 4px;
}

.fc .fc-timeGridDay-view .calendar-event,
.fc .fc-timeGridWeek-view .calendar-event,
.fc .fc-dayGridMonth-view .fc-h-event {
    background-color: var(--event-bg-color);
    border: none;
    box-shadow: -4px 0 var(--event-badge-color), 0 2px 4px var(--event-shadow-color);
    border-radius: 4px;
}

.fc .fc-event-main,
.fc .fc-event-main a {
    color: #505050;
    cursor: pointer;
    padding: 5px 8px;
}

.fc .fc-event-title {
    font-weight: 400;
}

.fc .calendar-event .fc-daygrid-event-dot,
.fc .calendar-event .fc-list-event-dot {
    border-color: var(--event-badge-color);
}

.fc .calendar-session .fc-daygrid-event-dot,
.fc .calendar-session .fc-list-event-dot {
    border-color: var(--session-badge-color);
}

.calendar-index .popover {
    box-shadow: 0 2px 5px rgba(0, 0, 0, .3);
    z-index: 1000;
}

.calendar-index .popover .calendar-tooltip-header {
    display: flex;
    justify-content: space-between;
}

.calendar-index .popover .calendar-tooltip-header p {
    margin-bottom: 0;
    font-weight: bolder;
}

.calendar-index .popover .calendar-tooltip-header .tooltip-buttons {
    margin-left: 25px;
}

.calendar-index .popover .calendar-tooltip-body p {
    margin-bottom: 0;
}

/* Grid view */
#date-container input {
    border: 1px solid #d8dbe0;
}

/* Quick note */
.quick-note-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 600px;
    z-index: 1051;
    transform: translate(-50%, -50%);
}

/* Casefile overview */
.c-app-overview .table td {
    vertical-align: middle;
}

.c-app-overview #tab-summary table {
    margin-bottom: 0;
}

.c-app-overview #tab-summary table tr:first-child th,
.c-app-overview #tab-summary table tr:first-child td {
    border: 0;
}

.c-app-overview .action-buttons {
    width: 150px;
}

.c-app-overview #tab-sessions .table-grid .tr-grid {
    grid-template-columns: 180px 250px 1fr 1fr 130px;
}

.c-app-overview #tab-activity .table-grid .tr-grid {
    grid-template-columns: repeat(6, 1fr) 130px;
}

.c-app-overview #tab-expenses .table-grid .tr-grid {
    grid-template-columns: repeat(5, 1fr);
}

.c-app-overview .report {
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, .4);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 3000;
}

.c-app-overview .btn-report i {
    pointer-events: none;
}

.c-app-overview .report .report-dropdown-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 280px;
    padding: 15px;
    background: #fff;
    z-index: 2;
    border: 1px solid rgba(0, 0, 0, .12);
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, .12);
}

.c-app-overview .report .report-dropdown-menu .kv-drp-container {
    width: 100%;
}

.c-app-overview .report .report-dropdown-menu .range-value {
    border: 1px solid rgba(0, 0, 0, .1) !important;
    cursor: pointer !important;
}

.c-app-overview .report .report-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 5px 0;
}

.c-app-overview .report .report-options label {
    margin-bottom: 0;
}

/* Client overview */
.c-app-overview #tab-casefiles table tr:first-child th,
.c-app-overview #tab-casefiles table tr:first-child td,
.c-app-overview #tab-contracts table tr:first-child th,
.c-app-overview #tab-contracts table tr:first-child td {
    border: 0;
}

.box-badge {
    width: 8px;
    border-radius: 5px 0 0 5px;
}

/* Guest */
.guest .card {
    margin-top: 25px;
}

.guest .guest-first-table {
    margin-bottom: 0;
}

.guest .guest-table th {
    width: 115px;
    text-align: right;
}

.guest .guest-table th,
.guest .guest-table td {
    border-top: 0;
    padding: 5px .75rem;
}

.guest .guest-table td {
    padding-left: 0;
}

.guest .guest-table td.solution-summary-td {
    text-align: left;
}

.guest .mobile-view {
    display: none;
}

@media screen and (max-width: 768px) {
    .guest .guest-second-table th,
    .guest .guest-second-table td {
        width: 100%;
        display: block;
    }

    .guest .guest-table th {
        text-align: left;
    }

    .guest .guest-second-table td {
        padding-left: .75rem;
    }

    .guest .guest-second-table {
        margin-top: 10px;
    }

    .guest .card-header {
        padding: 15px 0 !important;
    }

    .guest .card-header h1 {
        font-size: 22px;
    }

    .guest .card-header p {
        margin-bottom: 0;
    }

    .guest .card-body {
        padding: 1rem .5rem;
    }

    .guest .mobile-view {
        display: block;
        margin-left: .75rem;
        margin-right: .75rem;
    }

    .guest .guest-second-table .solution-summary-th {
        display: none;
    }

    .guest .guest-table td.solution-summary-td {
        text-align: justify;
    }
}
@media screen and (max-width: 576px) {
    .contact-index .switch-group {
        float: none !important;
        display: block !important;
    }

    .client-index .switch-group {
        float: none !important;
        margin-bottom: 10px;
    }
}
