﻿/* ============================================================
   MY APPLICATIONS – FULL RESPONSIVE CARD VIEW (FORCE OVERRIDE)
   ============================================================ */
@media only screen and (max-width: 1024px) {

    /* Hide grid headers */
    .k-grid-header {
        display: none !important;
    }

    /* Force table rows to block layout */
    .k-grid .k-grid-content tr[role="row"],
    .k-grid .k-grid-content table tr {
        display: block !important;
        border: 1px solid #c7e0ea !important;
        border-radius: 22px !important;
        background: #ffffff !important;
        margin-bottom: 15px !important;
        padding: 0px 45px !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        width: 100% !important;
    }

        /* Force table cells to behave like label:value rows */
        .k-grid .k-grid-content tr[role="row"] td,
        .k-grid .k-grid-content table tr td {
            display: flex !important;
            flex-wrap: wrap;
            justify-content: flex-start;
            align-items: baseline;
            border: none !important;
            border-bottom: 1px solid #e3f2f7 !important;
            padding: 6px 4px !important;
            background: none !important;
            width: 100% !important;
            text-align: left !important;
            white-space: normal !important;
            vertical-align: top !important;
        }

            /* Inject label before each value using data-title */
            .k-grid .k-grid-content tr[role="row"] td:before {
                content: attr(data-title) ": ";
                font-weight: 600;
                color: #00446e !important;
                flex: 0 0 45%;
                min-width: 140px;
                padding-right: 5px;
                text-align: left;
                white-space: normal !important;
            }

            /* Remove last border */
            .k-grid .k-grid-content tr[role="row"] td:last-child {
                border-bottom: none !important;
            }

    /* Fix nested inner tables (Documents grid etc.) */
    .k-grid .k-grid-content table {
        border: none !important;
        background: transparent !important;
        width: 100% !important;
        table-layout: auto !important;
    }

        .k-grid .k-grid-content table table {
            display: contents !important;
        }

    /* Buttons (Documents / Withdraw) */
    .k-grid .k-grid-content tr[role="row"] td:last-child {
        display: flex !important;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        border: none !important;
        padding-top: 10px !important;
        gap: 6px !important;
    }

    .k-grid .k-grid-content .k-button {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background-color: #007baf !important;
        color: #fff !important;
        border: none !important;
        border-radius: 5px !important;
        padding: 8px 14px !important;
        font-size: 13px !important;
        min-width: 110px !important;
        white-space: nowrap !important;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

        .k-grid .k-grid-content .k-button:hover {
            background-color: #005f88 !important;
        }

    /* Stack buttons on very narrow screens */
    @media only screen and (max-width: 480px) {
        .k-grid .k-grid-content tr[role="row"] td:last-child {
            flex-direction: column !important;
        }

        .k-grid .k-grid-content .k-button {
            width: 100% !important;
            margin: 4px 0 !important;
        }
    }
}
