/* ==================================================
   Trainer Certificate Template Preview
   Version: 1.4.0

   Purpose:
   - Trainer Certificate Canvas Standard v1.0
   - ISO A4 Landscape Governance Lock
   - AAU Trainer Certificate Rendering Standard
================================================== */

:root {
    --cg-border: #e5e7eb;
    --cg-surface: #ffffff;
    --cg-background: #f5f7fa;
    --cg-text: #111827;
    --cg-muted: #6b7280;
    --cg-primary: #2563eb;
    --cg-success: #15803d;
    --cg-warning: #92400e;
    --cg-warning-bg: #fffbeb;
    --cg-warning-border: #fde68a;
}

/* ==========================================
   Layout
========================================== */

.tcg-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 16px;
}

.tcg-page-header {
    margin-bottom: 24px;
}

.tcg-page-header h1 {
    margin: 0 0 8px 0;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cg-text);
}

.tcg-page-header p {
    margin: 0;
    color: var(--cg-muted);
}

/* ==========================================
   Notice Banner
========================================== */

.tcg-notice {
    background: var(--cg-warning-bg);
    border: 1px solid var(--cg-warning-border);
    color: var(--cg-warning);
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 24px;
}

/* ==========================================
   Cards
========================================== */

.tcg-card {
    background: var(--cg-surface);
    border: 1px solid var(--cg-border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

.tcg-card h2 {
    margin: 0 0 20px 0;
    font-size: 1.25rem;
    color: var(--cg-text);
}

/* ==========================================
   Search Panel
========================================== */

.tcg-search-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.tcg-field-group {
    display: flex;
    flex-direction: column;
}

.tcg-field-group label {
    margin-bottom: 6px;
    font-size: 0.875rem;
    color: var(--cg-muted);
}

.tcg-field-group input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--cg-border);
    border-radius: 8px;
    background: #ffffff;
}

/* ==========================================
   Information Grids
========================================== */

.tcg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
}

.tcg-field {
    border: 1px solid var(--cg-border);
    border-radius: 8px;
    padding: 12px;
    background: #fafafa;
}

.tcg-label {
    font-size: 0.8rem;
    color: var(--cg-muted);
    margin-bottom: 6px;
}

.tcg-value {
    font-weight: 600;
    color: var(--cg-text);
}

/* ==========================================
   Preview Area
========================================== */

.tcg-preview {
    min-height: 500px;

    display: flex;
    align-items: center;
    justify-content: center;

    text-align: center;

    padding: 32px;

    overflow-x: auto;
    overflow-y: hidden;

    border: 2px dashed var(--cg-border);
    border-radius: 12px;
    background: #fafafa;
}

.tcg-preview h3 {
    margin-bottom: 12px;
    color: var(--cg-text);
}

/* ==========================================
   Actions
========================================== */

.tcg-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.tcg-btn {
    padding: 10px 18px;
    border-radius: 8px;
    border: 1px solid var(--cg-border);
    background: #ffffff;
    cursor: pointer;
}

.tcg-btn:hover {
    background: #f9fafb;
}

.tcg-btn-primary {
    background: var(--cg-primary);
    border-color: var(--cg-primary);
    color: #ffffff;
}

.tcg-btn-primary:hover {
    opacity: 0.95;
}

.tcg-btn-disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ==========================================
   Responsive
========================================== */

@media (max-width: 768px) {

    .tcg-container {
        padding: 16px;
    }

    .tcg-card {
        padding: 16px;
    }

    .tcg-page-header h1 {
        font-size: 1.6rem;
    }

    .tcg-actions {
        flex-direction: column;
    }

    .tcg-btn {
        width: 100%;
    }
}

.trainer-certificate-template {

    /*
    ==========================================
    Trainer Certificate Canvas Standard v1.0
    STATUS: LOCKED

    Inner Frame Test
    STATUS: EXPERIMENTAL
    NOT YET LOCKED
    ==========================================
    */

    width: 1100px;
    height: 778px;

    margin: 0 auto;
    padding: 40px;

    background: #ffffff;
    text-align: center;

    box-sizing: border-box;

    position: relative;
}

.trainer-certificate-template::before {

    content: "";

    position: absolute;

    top: 16px;
    right: 16px;
    bottom: 16px;
    left: 16px;

    border: 2px solid #d1d5db;

    pointer-events: none;

    box-sizing: border-box;
}

.trainer-certificate-header {
    margin-bottom: 32px;
}

.trainer-certificate-emblem {
    width: 120px;
    height: auto;
    display: block;
    margin: 0 auto 16px auto;
}

.trainer-certificate-header h1 {
    margin: 0;
    font-size: 2.25rem;
    font-weight: 700;
    color: #111827;
}

.trainer-certificate-header h2 {
    margin-top: 12px;
    font-size: 1.6rem;
    font-weight: 600;
    color: #111827;
}

.trainer-certificate-body {
    margin-top: 32px;
}

.recognition-intro,
.recognition-text,
.program-label {
    color: #6b7280;
}

#trainercertLearnerName {
    font-size: 2rem;
    margin: 16px 0;
    color: #111827;
}

#trainercertCredentialType {
    font-size: 1.8rem;
    margin: 16px 0;
    color: #111827;
}

#trainercertProgramCode {
    margin-top: 8px;
    font-size: 1.2rem;
    color: #111827;
}

.trainer-certificate-footer {

    position: absolute;

    left: 0;
    right: 0;

    bottom: 25px;

    text-align: center;
}

.organization-emblem:not([src]),
.organization-emblem[src=""] {
    display: none;
}

/* ==========================================
   Trainer Attribution Layout v1.1
========================================== */

.trainer-attribution-grid {

    width: 700px;

    margin: 24px auto 12px auto;

    display: flex;

    justify-content: space-between;

    align-items: flex-start;

    gap: 80px;
}

.trainer-column,
.organization-column {

    width: 240px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: flex-start;

    gap: 8px;

    min-height: 160px;
}

.organization-emblem {

    width: 100px;
    height: 100px;

    object-fit: contain;

    object-position: center center;

    display: block;

    margin: 8px auto;

    image-rendering: auto;
}

.trainer-heading,
.organization-heading {

    font-size: 0.9rem;

    font-weight: 600;

    color: #374151;

    margin-bottom: 8px;
}

.trainer-name {

    font-size: 1rem;

    font-weight: 700;

    color: #111827;

    margin-bottom: 6px;
}

.organization-name {

    font-size: 0.95rem;

    font-weight: 600;

    color: #111827;
}

.trainer-id-line {

    color: #6b7280;
}

.training-program-label,
.training-period-label {

    font-size: 0.85rem;

    font-weight: 600;

    color: #6b7280;
}

.training-program-label {

    margin-top: 12px;
}

.training-program-name {

    font-size: 1rem;

    font-weight: 700;

    color: #111827;

    margin-bottom: 6px;
}

.training-period-value {

    font-size: 0.95rem;

    font-weight: 600;

    color: #111827;
}