﻿/* Base card styles with zoom-responsive layout */
.card_sample {
    min-height: 30rem;
    display: flex;
    flex-direction: column;
    margin-bottom: 1.25rem;
    height: auto;
}

    .card_sample .e-card {
        height: 100%;
        display: flex;
        flex-direction: column;
        box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.1);
        border-radius: 0.5rem;
        overflow: hidden;
        min-height: 30rem;
    }

        .card_sample .e-card .e-card-image {
            height: 8.75rem;
            min-height: 8.75rem;
            max-height: 8.75rem;
            overflow: hidden;
            flex-shrink: 0;
            position: relative;
            background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 0.9375rem;
            border-bottom: 1px solid #dee2e6;
        }

            .card_sample .e-card .e-card-image img {
                max-width: calc(100% - 1.25rem);
                max-height: calc(100% - 1.25rem);
                width: auto;
                height: auto;
                object-fit: contain;
                object-position: center;
                transition: all 0.3s ease;
                filter: drop-shadow(0 0.125rem 0.25rem rgba(0, 0, 0, 0.1));
            }

                .card_sample .e-card .e-card-image img:hover {
                    transform: scale(1.08);
                    filter: drop-shadow(0 0.25rem 0.5rem rgba(0, 0, 0, 0.15));
                }
            /* Fallback for missing images */
            .card_sample .e-card .e-card-image::before {
                content: '';
                position: absolute;
                top: 0;
                left: 0;
                right: 0;
                bottom: 0;
                background: linear-gradient(135deg, #2B9BD1 0%, #1E7BA8 100%);
                opacity: 0.05;
                z-index: 1;
            }
            /* Hide broken/missing images */
            .card_sample .e-card .e-card-image img[src=""],
            .card_sample .e-card .e-card-image img:not([src]),
            .card_sample .e-card .e-card-image img[src*="undefined"] {
                display: none;
            }
            /* Show fallback background and icon for missing images */
            .card_sample .e-card .e-card-image:has(img[src=""]),
            .card_sample .e-card .e-card-image:has(img:not([src])),
            .card_sample .e-card .e-card-image:has(img[src*="undefined"]) {
                background: linear-gradient(135deg, #f1f3f4 0%, #e8eaed 100%);
            }

                .card_sample .e-card .e-card-image:has(img[src=""]):after,
                .card_sample .e-card .e-card-image:has(img:not([src])):after,
                .card_sample .e-card .e-card-image:has(img[src*="undefined"]):after {
                    content: '🏢';
                    position: absolute;
                    top: 50%;
                    left: 50%;
                    transform: translate(-50%, -50%);
                    font-size: 1.5rem;
                    color: #9aa0a6;
                    z-index: 2;
                }

        .card_sample .e-card .e-card-header {
            padding: 0.75rem 1rem;
            flex-shrink: 0;
            border-bottom: 1px solid #e0e0e0;
            min-height: 6.875rem;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            overflow: visible;
        }

            .card_sample .e-card .e-card-header .e-card-header-title {
                font-size: 0.875rem;
                font-weight: 600;
                margin-bottom: 0.5rem;
                word-break: break-word !important;
                line-height: 1.3;
                width: 100%;
                display: block !important;
                text-align: center;
                hyphens: auto;
                white-space: normal !important;
                overflow: visible !important;
            }

            .card_sample .e-card .e-card-header .e-card-sub-title {
                font-size: 0.75rem;
                color: #666;
                margin: 0;
                width: 100%;
                text-align: center;
                line-height: 1.3;
                margin-top: auto;
                white-space: normal;
            }

            .card_sample .e-card .e-card-header *,
            .card_sample .e-card .e-card-header,
            .card_sample .e-card .e-card-header > div,
            .card_sample .e-card .e-card-header > span {
                word-break: break-word !important;
                white-space: normal !important;
                max-width: 100% !important;
            }

        .card_sample .e-card .e-card-content {
            padding: 0.75rem 1rem;
            flex-grow: 1;
            overflow: hidden;
            display: flex;
            flex-direction: column;
            min-height: 12.5rem;
        }

            .card_sample .e-card .e-card-content > div {
                margin-bottom: 0.5rem;
                font-size: 0.875rem;
                line-height: 1.4;
                word-break: break-word;
            }

                .card_sample .e-card .e-card-content > div:last-child {
                    margin-bottom: 0;
                }

                .card_sample .e-card .e-card-content > div:first-child {
                    display: flex;
                    align-items: center;
                    justify-content: space-between;
                    margin-bottom: 0.75rem;
                    flex-wrap: wrap;
                    gap: 0.5rem;
                }

            .card_sample .e-card .e-card-content .view-icon {
                background: linear-gradient(135deg, #2B9BD1 0%, #1E7BA8 100%);
                color: white;
                border: none;
                padding: 0.375rem 0.75rem;
                border-radius: 0.375rem;
                font-size: 0.75rem;
                cursor: pointer;
                transition: all 0.3s ease;
                white-space: nowrap;
                flex-shrink: 0;
                font-weight: 500;
                position: relative;
                overflow: hidden;
                box-shadow: 0 0.125rem 0.25rem rgba(43, 155, 209, 0.2);
                min-width: 4rem;
            }

                .card_sample .e-card .e-card-content .view-icon::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: linear-gradient(135deg, #1E7BA8 0%, #165F87 100%);
                    opacity: 0;
                    transition: opacity 0.3s ease;
                    z-index: -1;
                }

                .card_sample .e-card .e-card-content .view-icon:hover {
                    color: white;
                    transform: translateY(-0.125rem);
                    box-shadow: 0 0.25rem 0.75rem rgba(43, 155, 209, 0.4);
                }

                    .card_sample .e-card .e-card-content .view-icon:hover::before {
                        opacity: 1;
                    }

                .card_sample .e-card .e-card-content .view-icon:active {
                    transform: translateY(0);
                    box-shadow: 0 0.125rem 0.375rem rgba(43, 155, 209, 0.3);
                }

                .card_sample .e-card .e-card-content .view-icon i {
                    margin-right: 0.25rem;
                    font-size: 0.75rem;
                }

            .card_sample .e-card .e-card-content > div:not(:first-child) {
                overflow: hidden;
                text-overflow: ellipsis;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                max-height: 2.8em;
            }

            .card_sample .e-card .e-card-content > div strong {
                font-weight: 600;
                color: #333;
            }

        .card_sample .e-card .e-card-footer {
            padding: 0.75rem 1rem;
            border-top: 1px solid #e0e0e0;
            flex-shrink: 0;
            margin-top: auto;
        }

            .card_sample .e-card .e-card-footer .e-btn {
                width: 100%;
                height: 2.25rem;
                font-size: 0.875rem;
                background: linear-gradient(135deg, #2B9BD1 0%, #1E7BA8 100%);
                color: white;
                border: none;
                border-radius: 0.375rem;
                cursor: pointer;
                transition: all 0.3s ease;
                font-weight: 500;
                position: relative;
                overflow: hidden;
                box-shadow: 0 0.125rem 0.25rem rgba(43, 155, 209, 0.2);
                min-height: 2.25rem;
            }

                .card_sample .e-card .e-card-footer .e-btn::before {
                    content: '';
                    position: absolute;
                    top: 0;
                    left: 0;
                    right: 0;
                    bottom: 0;
                    background: linear-gradient(135deg, #1E7BA8 0%, #165F87 100%);
                    opacity: 0;
                    transition: opacity 0.3s ease;
                    z-index: -1;
                }

                .card_sample .e-card .e-card-footer .e-btn:hover {
                    transform: translateY(-0.0625rem);
                    box-shadow: 0 0.25rem 0.5rem rgba(43, 155, 209, 0.3);
                }

                    .card_sample .e-card .e-card-footer .e-btn:hover::before {
                        opacity: 1;
                    }

                .card_sample .e-card .e-card-footer .e-btn:active {
                    transform: translateY(0);
                    box-shadow: 0 0.125rem 0.25rem rgba(43, 155, 209, 0.2);
                }

/* Status badge */
.status-active {
    background-color: #ffeaa7;
    color: #d63031;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ZOOM-RESPONSIVE GRID SYSTEM */
.row {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    margin: 0 -0.9375rem;
}

.col-lg-3.col-md-4.col-sm-6 {
    padding: 0.9375rem;
    display: flex;
    flex-direction: column;
}

    .col-lg-3.col-md-4.col-sm-6 .card_sample {
        height: 100%;
    }

/* Responsive breakpoints for zoom/viewport */
@media screen and (min-width: 1200px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media screen and (min-width: 1090px) and (max-width: 1199px), screen and (min-width: 992px) and (max-width: 1089px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media screen and (max-width: 767px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ZOOM-SPECIFIC ADJUSTMENTS USING RESOLUTION MEDIA QUERIES */
@media screen and (min-resolution: 1.1dppx) and (max-resolution: 1.24dppx) and (min-width: 1090px), screen and (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx) and (min-width: 992px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media screen and (min-resolution: 1.1dppx) and (max-resolution: 1.24dppx) and (min-width: 1090px) {
    .card_sample .e-card .e-card-content .view-icon {
        font-size: 0.78125rem;
        padding: 0.40625rem 0.8125rem;
    }
}

@media screen and (min-resolution: 1.25dppx) and (max-resolution: 1.49dppx) and (min-width: 992px) {
    .card_sample .e-card .e-card-content .view-icon {
        font-size: 0.8125rem;
        padding: 0.4375rem 0.875rem;
    }
}

@media screen and (min-resolution: 1.5dppx) and (max-resolution: 1.74dppx) and (min-width: 768px) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    .card_sample .e-card .e-card-content .view-icon {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}

@media screen and (min-resolution: 1.75dppx) and (max-resolution: 1.99dppx), screen and (min-resolution: 2dppx) {
    .col-lg-3.col-md-4.col-sm-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* Responsive card adjustments for mobile/tablet */
@media (max-width: 768px) {
    .card_sample, .card_sample .e-card {
        min-height: 28rem;
    }

        .card_sample .e-card .e-card-image {
            height: 7.5rem;
            min-height: 7.5rem;
            max-height: 7.5rem;
        }

        .card_sample .e-card .e-card-header {
            min-height: 6rem;
        }

        .card_sample .e-card .e-card-content {
            min-height: 10rem;
        }
}

@media (max-width: 576px) {
    .card_sample, .card_sample .e-card {
        min-height: 26rem;
    }

        .card_sample .e-card .e-card-image {
            height: 6.5rem;
            min-height: 6.5rem;
            max-height: 6.5rem;
        }

        .card_sample .e-card .e-card-header {
            min-height: 5.5rem;
        }

        .card_sample .e-card .e-card-content {
            min-height: 9rem;
        }
}

/* High resolution displays */
@media (min-width: 1400px) {
    .card_sample .e-card .e-card-header .e-card-header-title {
        font-size: 1rem;
    }

    .card_sample .e-card .e-card-header .e-card-sub-title {
        font-size: 0.875rem;
    }

    .card_sample .e-card .e-card-content,
    .card_sample .e-card .e-card-content > div {
        font-size: 1rem;
    }
}

/* Utility classes */
.text-truncate-2 {
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    max-height: 2.8em;
    line-height: 1.4;
}

.text-truncate-1 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* BUTTON STYLE VARIATIONS (Material Design) */
.e-btn.primary {
    background: linear-gradient(135deg, #2B9BD1 0%, #1E7BA8 100%);
}

.e-btn.secondary {
    background: linear-gradient(135deg, #4FC3F7 0%, #29B6F6 100%);
}

.e-btn.outline {
    background: transparent;
    border: 2px solid #2B9BD1;
    color: #2B9BD1;
}

    .e-btn.outline:hover {
        background: #2B9BD1;
        color: white;
    }

/* Javascript zoom detection helper classes */
.zoom-100 .col-lg-3.col-md-4.col-sm-6 {
    flex: 0 0 25%;
    max-width: 25%;
}

.zoom-110 .col-lg-3.col-md-4.col-sm-6,
.zoom-125 .col-lg-3.col-md-4.col-sm-6 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.zoom-150 .col-lg-3.col-md-4.col-sm-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.zoom-175 .col-lg-3.col-md-4.col-sm-6,
.zoom-200 .col-lg-3.col-md-4.col-sm-6 {
    flex: 0 0 100%;
    max-width: 100%;
}

/* Blue branding button styles matching your interface */
.material-btn {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    gap: 8px;
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

    .material-btn.primary {
        background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 50%, #0288d1 100%);
        color: white;
        box-shadow: 0 3px 10px rgba(2, 136, 209, 0.3);
    }

        .material-btn.primary::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #29b6f6 0%, #0288d1 50%, #01579b 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 0;
        }

        .material-btn.primary:hover::before {
            opacity: 1;
        }

        .material-btn.primary:hover {
            box-shadow: 0 6px 20px rgba(2, 136, 209, 0.4);
            transform: translateY(-2px);
        }

        .material-btn.primary:active {
            transform: translateY(0);
            box-shadow: 0 3px 10px rgba(2, 136, 209, 0.3);
        }

            .material-btn.primary:active::before {
                opacity: 1;
                background: linear-gradient(135deg, #0288d1 0%, #01579b 50%, #0d47a1 100%);
            }

    .material-btn.danger {
        background: linear-gradient(135deg, #ff5722 0%, #f44336 50%, #d32f2f 100%);
        color: white;
        box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
    }

        .material-btn.danger::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: linear-gradient(135deg, #f44336 0%, #d32f2f 50%, #b71c1c 100%);
            opacity: 0;
            transition: opacity 0.3s ease;
            z-index: 0;
        }

        .material-btn.danger:hover::before {
            opacity: 1;
        }

        .material-btn.danger:hover {
            box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4);
            transform: translateY(-2px);
        }

        .material-btn.danger:active {
            transform: translateY(0);
            box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3);
        }

    .material-btn span, .material-btn i {
        position: relative;
        z-index: 1;
    }

    .material-btn i {
        font-size: 14px;
    }

    .material-btn.primary:focus {
        outline: 2px solid #4fc3f7;
        outline-offset: 2px;
    }

    .material-btn.danger:focus {
        outline: 2px solid #ff5722;
        outline-offset: 2px;
    }

    .material-btn:disabled {
        background: linear-gradient(135deg, #bdc3c7 0%, #95a5a6 100%);
        color: #7f8c8d;
        cursor: not-allowed;
        box-shadow: none;
    }

        .material-btn:disabled:hover {
            transform: none;
        }

        .material-btn:disabled::before {
            display: none;
        }

    .material-btn.secondary {
        background: linear-gradient(135deg, #f5f5f5 0%, #e0e0e0 100%);
        color: #0288d1;
        border: 1px solid #bdc3c7;
    }

        .material-btn.secondary:hover {
            background: linear-gradient(135deg, #e0e0e0 0%, #d0d0d0 100%);
            border-color: #0288d1;
        }

    .material-btn.outline {
        background: linear-gradient(135deg, transparent 0%, transparent 100%);
        color: #0288d1;
        border: 2px solid;
        border-image: linear-gradient(135deg, #4fc3f7 0%, #0288d1 100%) 1;
    }

        .material-btn.outline:hover {
            background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 50%, #0288d1 100%);
            color: white;
            border-image: none;
            border: 2px solid transparent;
        }

    .material-btn.small {
        padding: 6px 12px;
        font-size: 12px;
    }

    .material-btn.large {
        padding: 12px 24px;
        font-size: 16px;
    }

/* Accept button (special gradient) */
.accept-btn {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 50%, #0288d1 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(2, 136, 209, 0.3);
    position: relative;
    overflow: hidden;
}

    .accept-btn::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #29b6f6 0%, #0288d1 50%, #01579b 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .accept-btn:hover::before {
        opacity: 1;
    }

    .accept-btn:hover {
        box-shadow: 0 6px 16px rgba(2, 136, 209, 0.4);
        transform: translateY(-2px);
    }

    .accept-btn:active {
        transform: translateY(0);
        box-shadow: 0 2px 8px rgba(2, 136, 209, 0.3);
    }

        .accept-btn:active::before {
            opacity: 1;
            background: linear-gradient(135deg, #0288d1 0%, #01579b 50%, #0d47a1 100%);
        }

    .accept-btn:focus {
        outline: 2px solid #4fc3f7;
        outline-offset: 2px;
    }

    .accept-btn i {
        font-size: 12px;
        margin-right: 4px;
        position: relative;
        z-index: 1;
    }

    .accept-btn span {
        position: relative;
        z-index: 1;
    }

/* Footer button container styling */
.e-footer-content {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 20px 0;
    margin-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Override default Syncfusion button styles */
.e-btn.e-primary {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 50%, #0288d1 100%) !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(2, 136, 209, 0.3) !important;
    position: relative;
    overflow: hidden;
}

    .e-btn.e-primary::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #29b6f6 0%, #0288d1 50%, #01579b 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 0;
    }

    .e-btn.e-primary:hover::before {
        opacity: 1;
    }

    .e-btn.e-primary:hover {
        box-shadow: 0 6px 20px rgba(2, 136, 209, 0.4) !important;
        transform: translateY(-2px) !important;
    }

.e-btn.e-danger {
    background: linear-gradient(135deg, #ff5722 0%, #f44336 50%, #d32f2f 100%) !important;
    border: none !important;
    box-shadow: 0 3px 10px rgba(244, 67, 54, 0.3) !important;
    position: relative;
    overflow: hidden;
}

    .e-btn.e-danger::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: linear-gradient(135deg, #f44336 0%, #d32f2f 50%, #b71c1c 100%);
        opacity: 0;
        transition: opacity 0.3s ease;
        z-index: 0;
    }

    .e-btn.e-danger:hover::before {
        opacity: 1;
    }

    .e-btn.e-danger:hover {
        box-shadow: 0 6px 20px rgba(244, 67, 54, 0.4) !important;
        transform: translateY(-2px) !important;
    }
