﻿.cert-upload-box {
    width: 150px;
    height: 130px;
    border: 1px solid #ccc;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

    .cert-upload-box:hover {
        border-color: #333;
    }

.cert-upload-content {
    text-align: center;
    color: #666;
    font-size: 13px;
    line-height: 1.4;
}

    .cert-upload-content svg {
        margin-bottom: 8px;
    }

.cert-upload-box {
    width: min(100%, 340px);
    height: 210px;
    border: 2px dashed #c8c8c8;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    background: #fafafa;
    transition: border-color 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.cert-upload-box:hover,
.cert-upload-box:focus,
.cert-upload-box.drag-over {
    border-color: #111;
    background: #f3f3f3;
    box-shadow: 0 0 0 3px rgba(0, 0, 0, .06);
    outline: none;
}

.cert-upload-box.has-file {
    border-style: solid;
    border-color: #333;
    background: #fff;
}

.cert-upload-box.cert-upload-error {
    border-color: #b42318;
}

.cert-upload-content {
    padding: 20px;
}

.cert-upload-content p {
    margin: 0 0 5px;
    font-weight: 600;
    color: #333;
}

.cert-upload-content span {
    font-size: 12px;
    color: #777;
}

.cert-upload-preview,
.cert-upload-preview img,
.cert-upload-preview iframe {
    width: 100%;
    height: 100%;
}

.cert-upload-preview img {
    display: block;
    object-fit: contain;
    background: #f4f4f4;
}

.cert-upload-preview iframe {
    display: block;
    border: 0;
    pointer-events: none;
    background: #fff;
}

.cert-upload-preview [hidden],
.cert-viewer-body [hidden] {
    display: none;
}

.cert-preview-overlay {
    position: absolute;
    right: 10px;
    bottom: 10px;
    padding: 4px 9px;
    border-radius: 20px;
    color: #fff;
    background: rgba(0, 0, 0, .78);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.cert-file-status {
    max-width: 360px;
    overflow-wrap: anywhere;
    color: #333;
    font-size: 13px;
    font-weight: 600;
}

.cert-file-status-error {
    color: #b42318;
}

.cert-file-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
}

.cert-file-actions[hidden] {
    display: none;
}

.cert-action-button {
    border: 1px solid #111;
    border-radius: 5px;
    padding: 7px 13px;
    color: #fff;
    background: #111;
    font-size: 12px;
    font-weight: 600;
}

.cert-action-button-remove {
    color: #222;
    background: #fff;
    border-color: #bbb;
}

.cert-viewer[hidden] {
    display: none;
}

.cert-viewer {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(0, 0, 0, .72);
}

.cert-viewer-dialog {
    width: min(920px, 100%);
    max-height: calc(100vh - 48px);
    overflow: hidden;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .35);
}

.cert-viewer-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 16px 20px;
    border-bottom: 1px solid #ddd;
}

.cert-viewer-header h3 {
    margin: 0 0 3px;
    font-size: 20px;
}

.cert-viewer-header p {
    margin: 0;
    color: #666;
    font-size: 13px;
    overflow-wrap: anywhere;
}

.cert-viewer-close {
    flex: 0 0 auto;
    border: 0;
    padding: 0 4px;
    color: #111;
    background: transparent;
    font-size: 30px;
    line-height: 1;
}

.cert-viewer-body {
    height: min(72vh, 720px);
    padding: 12px;
    background: #ececec;
}

.cert-viewer-body img,
.cert-viewer-body iframe {
    width: 100%;
    height: 100%;
    border: 0;
    object-fit: contain;
    background: #fff;
}

body.cert-viewer-open {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    .cert-upload-box {
        width: 100%;
        height: 190px;
    }

    .cert-viewer {
        padding: 10px;
    }

    .cert-viewer-dialog {
        max-height: calc(100vh - 20px);
    }

    .cert-viewer-body {
        height: 75vh;
        padding: 7px;
    }
}

.form-group-sell textarea {
    padding: 10px;
    border: 1px solid #ccc;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.my-4 {
    margin-top: 1.5rem !important;
    margin-bottom: 1.5rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

label.error {
    color: red;
    font-size: 11px;
}

input.error, select.error, textarea.error {
    border-color: #dc3545;
}

@media (max-width: 600px) {
    .form-grid {
        grid-template-columns: 1fr !important;
    }
}
