/* Upload/Edit form - Figma design 3801-24389 */
/* Restyles the edit/upload code page per BAIF design system */

/* Page background */
.upload-page-container {
    background: transparent;
}

/* Breadcrumbs - green links per Figma */
.breadcrumbs a {
    color: #45ce16;
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

/* Main form card */
#upload-form {
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    margin-bottom: 32px;
}

/* Form header section */
.upload-form-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding-bottom: 24px;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.upload-form-header-text h3.upload-header {
    font-size: 21px;
    font-weight: 600;
    color: #0a0a0a;
    margin: 0 0 8px 0;
    line-height: 24px;
}

.upload-form-header-text .upload-subline {
    font-size: 15px;
    font-weight: 400;
    color: #0a0a0a;
    margin: 0;
    line-height: 24px;
}

.upload-form-header-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Collaborate button - blue */
.btn-collaborate {
    background: #217ef0 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    font-weight: 500;
    height: 32px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-collaborate:hover {
    background: #1a6ad4 !important;
}

/* Delete button - red border */
.btn-delete-edit {
    background: white !important;
    border: 1px solid #ffc9c9 !important;
    color: #bb1416 !important;
    border-radius: 8px;
    padding: 0;
    width: 36px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-edit:hover {
    background: #fae8e8 !important;
}

/* Form rows - stack layout: label on top, input below */
#upload-form .row {
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

#upload-form .input-field.col {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
}

#upload-form .input-field.col.s12.m2 {
    width: 100%;
    max-width: 100%;
}

#upload-form .input-field.col.s12.m10 {
    width: 100%;
    max-width: 100%;
}

/* Labels - above inputs, no overlap */
#upload-form .input-field > label {
    font-size: 15px;
    font-weight: 500;
    color: #0a0a0a;
    margin: 0 0 8px 0 !important;
    display: block !important;
    position: static !important;
    transform: none !important;
}

/* Inputs */
#upload-form .custom-input,
#upload-form .autocomplete,
#upload-form input[type="text"],
#upload-form input[type="url"],
#upload-form input[type="email"] {
    border: 1px solid #d9dade !important;
    border-radius: 4px;
    height: 32px;
    padding: 8px 12px;
    font-size: 15px;
    color: #0a0a0a;
}

#upload-form .custom-input::placeholder,
#upload-form input::placeholder {
    color: #6b7280;
}

/* Select dropdowns */
#upload-form select.browser-default {
    border: 1px solid #d9dade;
    border-radius: 4px;
    height: 32px;
    padding: 0 12px;
    font-size: 15px;
}

/* Repository URL Options - green info box */
.upload-repo-url-box {
    background: #ecfae8 !important;
    border: none !important;
    border-left: 3px solid #45ce16 !important;
    padding: 16px 20px !important;
    border-radius: 0 4px 4px 0;
    margin: 16px 0 !important;
}

.upload-repo-url-box strong {
    font-size: 16px;
    font-weight: 600;
}

/* Status tags - Rejected, Unpublished */
.ribbon-status-container .status-ribbon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.ribbon-status-container .status-ribbon.red-ribbon {
    background: #fae8e8;
    color: #bb1416;
}

.ribbon-status-container .status-ribbon.blue-ribbon {
    background: #e9f2fe;
    color: #217ef0;
}

.ribbon-status-container .status-ribbon.purple-ribbon {
    background: #f3e8f8;
    color: #7c3aed;
}

.ribbon-status-container .status-ribbon.green-ribbon,
.ribbon-status-container .status-ribbon.orange-ribbon {
    background: #ecfae8;
    color: #45ce16;
}

/* Action buttons - Re-verify, Publish, Vericode */
.status-row .btn.red {
    background: #d84546 !important;
    color: white !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    height: 32px;
}

.status-row .btn.green {
    background: #45ce16 !important;
    color: white !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    height: 32px;
}

.status-row .btn.blue {
    background: #217ef0 !important;
    color: white !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    height: 32px;
}

.status-row .btn.purple {
    background: #7c3aed !important;
    color: white !important;
    border-radius: 8px;
    padding: 6px 12px;
    font-size: 14px;
    height: 32px;
}

/* Cheats warning box */
.reject-message pre,
.upload-cheats-warning {
    background: #ecfae8 !important;
    border: none !important;
    border-left: 3px solid #45ce16 !important;
    padding: 12px 16px !important;
    margin: 12px 0 !important;
}

/* Textarea */
#upload-form textarea {
    border: 1px solid #d9dade !important;
    border-radius: 4px;
    padding: 16px;
}

/* CodeMirror */
#upload-form .CodeMirror {
    border: 1px solid #d9dade !important;
    border-radius: 8px;
}

/* Atoms helper text */
#upload-form .text-black.text-xs {
    font-size: 15px;
    color: #6b7280;
}

/* Save Changes / Submit button */
.submit-btn .btn.green {
    background: #217ef0 !important;
    color: white !important;
    border-radius: 8px;
    padding: 8px 24px;
    font-size: 14px;
}

/* Ribbon status spacing */
.ribbon-status-container {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

/* All action buttons (Re-verify, Atomize, Publish, Unpublish, Vericode, Preview) - squareish design per Figma */
.ribbon-status-container .btn,
.preview-structure-container .btn {
    border-radius: 8px !important;
    height: 32px !important;
    min-height: 32px !important;
    line-height: 1 !important;
    padding: 0 12px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Certificates strip (edit page) — mint card like stats /cert summary pills */
.upload-cert-banner {
    margin-top: 2.25rem;
    margin-bottom: 1.75rem;
}

.upload-cert-banner__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 1.25rem;
    background: #ecfae8;
    border: 1px solid #3fbb14;
    border-radius: 16px;
    padding: 1rem 1.15rem;
    box-sizing: border-box;
}

.upload-cert-banner__body {
    flex: 1 1 220px;
    min-width: 0;
}

.upload-cert-banner__title {
    margin: 0 0 0.75rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0a0a0a;
}

.upload-cert-banner__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

/* upload.css applies `form { background:white; padding:35px; ... }` to every form — reset for this POST-only control */
.upload-cert-banner__form {
    display: inline-flex;
    align-items: center;
    margin: 0;
    margin-bottom: 0;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
    width: auto;
    max-width: none;
    vertical-align: middle;
}

.upload-cert-banner__btn {
    appearance: none;
    -webkit-appearance: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    text-transform: none;
    font-size: 14px;
    font-weight: 500;
    box-shadow: none;
    height: 36px;
    line-height: 1;
    padding: 0 14px;
    margin: 0;
    cursor: pointer;
    text-decoration: none;
    box-sizing: border-box;
    border-width: 1px;
    border-style: solid;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.upload-cert-banner__btn:focus-visible {
    outline: 2px solid #217ef0;
    outline-offset: 2px;
}

.upload-cert-banner__btn--primary {
    background: #3fbb14;
    color: #fff;
    border-color: #2d9a0e;
}

.upload-cert-banner__btn--primary:hover {
    background: #349a11;
}

.upload-cert-banner__btn--outline {
    background: transparent;
    color: #17610b;
    border-color: #3fbb14;
}

.upload-cert-banner__btn--outline:hover {
    background: rgba(63, 187, 20, 0.08);
}
