﻿/*
    Red Nose IT Hub - Shared Portal Components
    -------------------------------------------
    Reusable presentation classes for Web Forms pages.

    Recommended location:
        /Content/portal-components.css
*/

/* =========================================================
   Page headings
   ========================================================= */

.portal-page-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.portal-page-title {
    margin: 0;
    font-size: 1.75rem;
    font-weight: 600;
    line-height: 1.25;
}

.portal-page-subtitle {
    margin-top: 0.35rem;
    color: #6c757d;
}


/* =========================================================
   Cards
   ========================================================= */

.portal-card {
    border: 1px solid rgba(0, 0, 0, 0.125);
    border-radius: 0.5rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.04);
}

    .portal-card > .card-header {
        padding: 1rem 1.25rem;
        background-color: #fff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    }

    .portal-card > .card-body {
        padding: 1.25rem;
    }


/* =========================================================
   Summary and status panels
   ========================================================= */

.portal-status-panel {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem 1.25rem;
    border: 1px solid transparent;
    border-radius: 0.5rem;
}

.portal-status-icon {
    flex: 0 0 auto;
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 700;
}

.portal-status-content {
    min-width: 0;
}

.portal-status-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.portal-status-message {
    margin: 0.25rem 0 0;
}

.portal-status-success {
    color: #0f5132;
    background-color: #d1e7dd;
    border-color: #badbcc;
}

    .portal-status-success .portal-status-icon {
        background-color: #0f5132;
        color: #fff;
    }

.portal-status-warning {
    color: #664d03;
    background-color: #fff3cd;
    border-color: #ffecb5;
}

    .portal-status-warning .portal-status-icon {
        background-color: #997404;
        color: #fff;
    }

.portal-status-danger {
    color: #842029;
    background-color: #f8d7da;
    border-color: #f5c2c7;
}

    .portal-status-danger .portal-status-icon {
        background-color: #842029;
        color: #fff;
    }

.portal-status-info {
    color: #055160;
    background-color: #cff4fc;
    border-color: #b6effb;
}

    .portal-status-info .portal-status-icon {
        background-color: #087990;
        color: #fff;
    }


/* =========================================================
   Statistic tiles
   ========================================================= */

.portal-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.portal-stat-tile {
    min-width: 0;
    padding: 1rem;
    background-color: #fff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
}

.portal-stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    font-weight: 500;
}

.portal-stat-value {
    margin-top: 0.25rem;
    font-size: 1.65rem;
    font-weight: 600;
    line-height: 1.2;
}

.portal-stat-detail {
    margin-top: 0.25rem;
    color: #6c757d;
    font-size: 0.8rem;
}


/* =========================================================
   Progress
   ========================================================= */

.portal-progress-panel {
    padding: 1.25rem;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 0.5rem;
    background-color: #fff;
}

.portal-progress-heading {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.portal-progress-label {
    font-weight: 600;
}

.portal-progress-percent {
    color: #6c757d;
}

.portal-progress-message {
    margin-top: 0.65rem;
    color: #6c757d;
    font-size: 0.875rem;
}


/* =========================================================
   Empty states
   ========================================================= */

.portal-empty-state {
    padding: 3rem 1.5rem;
    text-align: center;
    border: 1px dashed rgba(0, 0, 0, 0.2);
    border-radius: 0.5rem;
    background-color: #fafafa;
}

.portal-empty-state-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.portal-empty-state-message {
    max-width: 34rem;
    margin: 0.5rem auto 0;
    color: #6c757d;
}


/* =========================================================
   Wizard navigation
   ========================================================= */

.portal-wizard-navigation {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 1.5rem;
}

.wizard-step {
    position: relative;
    color: #6c757d;
}

.wizard-number {
    width: 2.25rem;
    height: 2.25rem;
    margin: 0 auto 0.4rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ced4da;
    border-radius: 50%;
    background-color: #fff;
    font-weight: 600;
}

.wizard-title {
    font-size: 0.85rem;
    font-weight: 500;
}

.wizard-step.active {
    color: #0d6efd;
}

    .wizard-step.active .wizard-number {
        color: #fff;
        background-color: #0d6efd;
        border-color: #0d6efd;
    }

.wizard-step.completed {
    color: #198754;
}

    .wizard-step.completed .wizard-number {
        color: #fff;
        background-color: #198754;
        border-color: #198754;
    }


/* =========================================================
   Tables
   ========================================================= */

.portal-table th {
    white-space: nowrap;
    font-weight: 600;
}

.portal-table td {
    vertical-align: middle;
}


/* =========================================================
   Responsive behaviour
   ========================================================= */

@media (max-width: 991.98px) {
    .portal-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    .portal-page-header {
        flex-direction: column;
    }

    .portal-stat-grid {
        grid-template-columns: 1fr;
    }

    .portal-wizard-navigation {
        flex-direction: column-reverse;
    }

        .portal-wizard-navigation .btn {
            width: 100%;
        }

    .wizard-title {
        font-size: 0.75rem;
    }

    .wizard-number {
        width: 2rem;
        height: 2rem;
    }
}
