//
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle 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 General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
//
//
// Adaptable card blocks
//
// @package    theme_adaptable
// @copyright  2019 G J Barnard - {@link http://moodle.org/user/profile.php?id=442195}
// @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
//

$card-group-margin: .25rem; // Assuming Boost default preset is used.
$card-deck-margin: $card-group-margin !default;
$card-gutter : $card-deck-margin * 2;

body.zoomin {
    .dashboard-card-deck:not(.fixed-width-cards) {
        @media (min-width: 576px) {
            .dashboard-card {
                width: calc(100% - #{$card-gutter});
            }
        }
        @media (min-width: 840px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 1100px) {
            .dashboard-card {
                width: calc(33.33% - #{$card-gutter});
            }
        }
        @media (min-width: 1360px) {
            .dashboard-card {
                width: calc(25% - #{$card-gutter});
            }
        }
    }
}

body:not(.zoomin) {
    .dashboard-card-deck:not(.fixed-width-cards) {
        @media (min-width: 576px) {
            .dashboard-card {
                width: calc(100% - #{$card-gutter});
            }
        }
        @media (min-width: 768px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 1100px) {
            .dashboard-card {
                width: calc(33.33% - #{$card-gutter});
            }
        }
        @media (min-width: 1360px) {
            .dashboard-card {
                width: calc(25% - #{$card-gutter});
            }
        }
    }
}

body:not(.zoomin) #page.fullin {
    .dashboard-card-deck:not(.fixed-width-cards) {
        @media (min-width: 576px) {
            .dashboard-card {
                width: calc(100% - #{$card-gutter});
            }
        }
        @media (min-width: 768px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 1100px) {
            .dashboard-card {
                width: calc(33.33% - #{$card-gutter});
            }
        }
        @media (min-width: 1360px) {
            .dashboard-card {
                width: calc(25% - #{$card-gutter});
            }
        }
    }
}

body.zoomin #page.fullin {
    .dashboard-card-deck:not(.fixed-width-cards) {
        @media (min-width: 576px) {
            .dashboard-card {
                width: calc(50% - #{$card-gutter});
            }
        }
        @media (min-width: 840px) {
            .dashboard-card {
                width: calc(33.33% - #{$card-gutter});
            }
        }
        @media (min-width: 1100px) {
            .dashboard-card {
                width: calc(25% - #{$card-gutter});
            }
        }
        @media (min-width: 1360px) {
            .dashboard-card {
                width: calc(20% - #{$card-gutter});
            }
        }
    }
}
