/*
 * The «Belge» section of the training definition form (EGT-225, design `52`
 * Ekran 1).
 *
 * ⚠ Plain CSS served through `filament:assets`, NOT a Tailwind theme build —
 * the reason `permission-matrix.css` gives: the panel has no custom theme, so
 * a class written into a Blade view is never generated.
 *
 * ⛔ What it draws that Filament does not:
 *
 *   1. The three certificate ways as CARDS. Filament's radio list is a column
 *      of dots; the design is three bordered cards in a row, the chosen one
 *      tinted, and the card is what says these are three different paths
 *      rather than three settings of one.
 *   2. The template's thumbnail with its print-area sketch, and the file card
 *      with its version badge.
 *
 * Colours are the panel's own variables, so the dark theme follows.
 */

/* 1 · The cards. */
.fi-certificate-modes.fi-fo-radio {
    gap: 0.5625rem;
}

.fi-certificate-modes .fi-fo-radio-label {
    align-items: flex-start;
    border: 1px solid var(--gray-200);
    border-radius: 0.625rem;
    padding: 0.6875rem 0.8125rem;
    cursor: pointer;
    height: 100%;
}

.fi-certificate-modes .fi-fo-radio-label:has(input:checked) {
    border: 1.5px solid var(--primary-600);
    background-color: color-mix(in oklab, var(--primary-600) 5%, transparent);
}

.fi-certificate-modes .fi-fo-radio-label:has(input:checked) .fi-fo-radio-label-text > p:first-child {
    font-weight: 800;
}

.fi-certificate-modes .fi-fo-radio-label-text > p:first-child {
    font-weight: 700;
}

.fi-certificate-modes .fi-fo-radio-label-description {
    font-size: 0.6875rem;
}

/* ⚠ One column at phone width: three cards in 375px read as three stubs. */
@media (max-width: 640px) {
    .fi-certificate-modes.fi-fo-radio {
        grid-template-columns: 1fr !important;
    }
}

/* The label over the template block, with the required mark. */
.fi-certificate-template-label {
    font-size: 0.875rem;
    font-weight: 600;
}

.fi-certificate-required,
.fi-certificate-series-missing {
    color: var(--danger-600);
}

.fi-certificate-series-prefix {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-weight: 600;
}

/* 2 · The thumbnail, 212 × 150 as drawn. */
.fi-certificate-thumb {
    position: relative;
    width: 212px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    border-radius: 0.5rem;
    background: white;
}

.fi-certificate-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.fi-certificate-thumb-frame {
    position: absolute;
    inset: 7px;
    border: 3px double var(--gray-300);
}

.fi-certificate-thumb-logo,
.fi-certificate-thumb-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    background: var(--gray-200);
}

.fi-certificate-thumb-logo {
    top: 16px;
    width: 44px;
    height: 12px;
}

.fi-certificate-thumb-title {
    top: 34px;
    width: 110px;
    height: 7px;
    background: var(--gray-300);
}

.fi-certificate-thumb-area {
    position: absolute;
    top: 50px;
    left: 26px;
    right: 26px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed var(--primary-600);
    background: color-mix(in oklab, var(--primary-600) 6%, transparent);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.6px;
    color: var(--primary-700);
}

.fi-certificate-thumb-sign {
    position: absolute;
    bottom: 14px;
    width: 46px;
    height: 2px;
    background: var(--gray-300);
}

.fi-certificate-thumb-sign-left {
    left: 30px;
}

.fi-certificate-thumb-sign-right {
    right: 30px;
}

/* The file in use, its badge and «Örnekle önizle». */
.fi-certificate-current {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    border: 1px solid var(--success-200);
    background: color-mix(in oklab, var(--success-600) 3%, transparent);
    border-radius: 0.5625rem;
    padding: 0.5625rem 0.75rem;
}

.fi-certificate-current-text {
    flex: 1;
    min-width: 0;
}

.fi-certificate-current-name {
    font-size: 0.78rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.fi-certificate-current-badge {
    margin-left: 0.25rem;
    padding: 1px 7px;
    border-radius: 6px;
    background: var(--success-100);
    color: var(--success-700);
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}

.fi-certificate-current-meta {
    font-size: 0.6875rem;
    color: var(--gray-500);
}

.fi-certificate-current-preview {
    font-size: 0.72rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--primary-600);
}

.fi-certificate-template-rule {
    font-size: 0.6875rem;
    line-height: 1.55;
}
