/* ARQIV palette applied (from arqiv-index.html) */

body {
Font-family: 'Monda';
  font-style: normal;
  font-weight: 400;
}

.sale-lead-status-interested {
  background-color: var(--warn) !important;
}
.sale-lead-status-unknown {
  background-color: var(--info) !important;
}
.sale-lead-status-not-interested {
  background-color: var(--warn) !important;
}
.sale-lead-status-waiting-for-contract {
  background-color: var(--ok) !important;
}

a.quote-url, a.purchase_order-url{
  text-decoration: none;
  color:var(--text);
}

.quote-url-clipboard:before, .purchase_order-url-clipboard:before{
  font-family: "Font Awesome 5 Free"; 
  font-weight: 900; 
  content:"\f46d ";
  padding-right: 5px;
  color:var(--accent);
}

/* =========================================================
   GAME REFERENCE – IMAGE SLOTS / GALLERY
   ========================================================= */

.arqiv-gr-thumb {
    height: 100px;
    width: auto;
    display: block;
}

.arqiv-gr-slots {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.arqiv-gr-slot {
    display: inline-block;
    vertical-align: top;
    width: 160px;
}

.arqiv-gr-preview {
    position: relative;
    width: 160px;
    height: 200px;
    overflow: hidden;
    background: var(--bg);
    border: 1px solid rgba(255,255,255,.15);
    border-radius: 8px;
    cursor: pointer;
}

.arqiv-gr-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arqiv-gr-slot-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
    align-items: center;
}

.gr-image-upload-panel {
    position: relative;
}

.gr-image-upload-disabled-message {
    display: none;
}

.gr-images-disabled .gr-image-upload-panel .gr-image-upload-disabled-message {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    text-align: center;
    background: rgba(122, 122, 122, 0.82);
    color: var(--text);
    font-weight: 600;
    border-radius: 6px;
    z-index: 2;
}

.gr-images-disabled .gr-image-upload-panel .arqiv-gr-slots {
    pointer-events: none;
    opacity: 0.38;
}

.game-reference-image-upload-button,
.game-reference-image-file,
.game-reference-image-choose-button {
    background-color: var(--accent);
    color: var(--text);
    width: 45px;
}

.game-reference-image-upload-button::before{
  font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f093";color:inherit;
}

.game-reference-image-choose-button::before{
  font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f245";color:inherit;
}

.game-reference-image-delete-button{
    opacity: 0.8;
    color: #fff !important;
    background-color: #c62828 !important;
    border-color: #c62828 !important;
    background-image: none !important;
    width: 45px;
}

.game-reference-image-delete-button:hover{
    background-color: #b71c1c !important;
    border-color: #b71c1c !important;
}

.game-reference-image-delete-button:before{
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f1f8";
    color: inherit;
    margin-right: 0;
}

.game-reference-image-delete-button:has(> span:not(:empty)):before{
    margin-right: var(--button-icon-margin-right);
}

.game-reference-image-primary-button{
    opacity: 0.8;
    color: #fff!important;
    background-color:  goldenrod!important;
    border-color: goldenrod!important;
    background-image: none!important;
    width: 45px;
}

.game-reference-image-primary-button:before,
.arqiv-gr-primary-badge:before{
    font-family: "Font Awesome 5 Free"; font-weight: 900; content: "\f521";color:inherit;
}

.game-reference-image-rotate-button{
    opacity: 0.8;
    color: #fff !important;
    background-color: var(--accent) !important;
    border-color: var(--accent) !important;
    background-image: none !important;
    width: 45px;
}

.game-reference-image-rotate-button:before{
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f2f9";
    color: inherit;
    margin-right: 0;
}

.game-reference-image-settings-button{
    opacity: 0.8;
    color: #fff !important;
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    background-image: none !important;
    width: 45px;
}

.game-reference-image-settings-button:before{
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    content: "\f013";
    color: inherit;
    margin-right: 0;
}

.arqiv-gr-soq-thumb{
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}

.arqiv-gr-primary-badge {
  background-color:  goldenrod!important;
  border-color: goldenrod!important;
  color: #fff!important;
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 10;
    padding: 4px 8px;
    font-size: 11px;
    border-radius: 4px;
    text-transform: uppercase;
}

/* Gallery */
.arqiv-gr-gallery-wrap {
    width: 100%;
}

.arqiv-gr-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.arqiv-gr-card {
    width: 160px;
}

.arqiv-gr-card-preview {
    position: relative;
    width: 160px;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.15);
    background: var(--bg);
    cursor: pointer;
}

.arqiv-gr-card-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.arqiv-gr-card.is-primary .arqiv-gr-card-preview {
    box-shadow: 0 0 0 2px goldenrod;
}

.arqiv-gr-card-actions {
    position: absolute;
    right: 8px;
    bottom: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.arqiv-gr-card-actions .game-reference-image-primary-button,
.arqiv-gr-card-actions .game-reference-image-settings-button,
.arqiv-gr-card-actions .game-reference-image-rotate-button,
.arqiv-gr-card-actions .game-reference-image-delete-button {
    width: 38px;
    min-width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.arqiv-gr-card-actions .game-reference-image-primary-button.is-active {
    box-shadow: 0 0 0 2px rgba(255,255,255,.35);
}

.arqiv-gr-card.is-rotating .arqiv-gr-card-preview {
    opacity: .65;
}

.arqiv-gr-card.is-rotating .arqiv-gr-card-actions button:not(.game-reference-image-rotate-button) {
    pointer-events: none;
}

.game-reference-image-rotate-button[disabled] {
    opacity: .5;
    cursor: default;
}

.arqiv-gr-image-view-badge {
    position: absolute;
    left: 8px;
    bottom: 8px;
    max-width: calc(100% - 64px);
    padding: 4px 8px;
    border-radius: 4px;
    background: rgba(0,0,0,.72);
    color: #fff;
    font-size: 11px;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.arqiv-gr-add-preview {
    background: #000;
    border: 1px solid rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
}

.arqiv-gr-add-preview:hover {
    border-color: rgba(255,255,255,.35);
}

.arqiv-gr-add-plus {
    color: #fff;
    font-size: 56px;
    line-height: 1;
    font-weight: 400;
    user-select: none;
}

.gr-image-view-modal-options {
    display: grid;
    gap: 10px;
}

.gr-image-view-option {
    width: 100%;
    border: 1px solid rgba(255,255,255,.16);
    background: var(--bg);
    color: var(--text);
    padding: 12px 14px;
    text-align: left;
    border-radius: 8px;
    cursor: pointer;
}

.gr-image-view-option:hover,
.gr-image-view-option.is-active {
    border-color: var(--accent);
    box-shadow: 0 0 0 1px var(--accent) inset;
}

.gr-information-panel {
    position: relative;
}

.gr-release-link-panel {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    background: rgba(255,255,255,.03);
}

.gr-release-link-title {
    margin-bottom: 10px;
    font-size: 13px;
    font-weight: 700;
    opacity: 0.9;
}

.gr-subrelease-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-weight: 600;
    cursor: pointer;
}

.gr-subrelease-toggle input {
    margin: 0;
}

.gr-main-release-select-wrap {
    margin-top: 6px;
}

.gr-information-fields {
    position: relative;
}

#gameReferenceEditForm .gr-general-layout .DTE_Field {
    width: 100%;
}

#gameReferenceEditForm .gr-general-layout > .EVX-Tab-Flex-1:nth-child(-n+3),
#gameReferenceEditForm .gr-general-layout > fieldset.EVX-Tab-Flex-1:nth-child(-n+3) {
    flex: 0 1 calc((100% - 32px) / 3);
    max-width: calc((100% - 32px) / 3);
}

#gameReferenceEditForm .gr-general-layout > .EVX-Tab-Flex-1:nth-child(n+4),
#gameReferenceEditForm .gr-general-layout > fieldset.EVX-Tab-Flex-1:nth-child(n+4) {
    flex: 0 1 calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
}

@media (max-width: 1100px) {
    #gameReferenceEditForm .gr-general-layout > .EVX-Tab-Flex-1,
    #gameReferenceEditForm .gr-general-layout > fieldset.EVX-Tab-Flex-1 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

#grSaleEditForm .gr-sale-layout > .EVX-Tab-Flex-2,
#grSaleEditForm .gr-sale-layout > fieldset.EVX-Tab-Flex-2 {
    flex: 0 1 calc((100% - 16px) / 2);
    max-width: calc((100% - 16px) / 2);
}

#grSaleEditForm .gr-sale-layout .DTE_Field {
    width: 100%;
}

#grSaleEditForm div.DTE_Body div.DTE_Body_Content div.DTE_Field,
#grSaleEditForm div.DTE_Field {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

#grSaleEditForm div.DTE_Body div.DTE_Body_Content div.DTE_Field > label,
#grSaleEditForm div.DTE_Field > label {
    float: none !important;
    display: block;
    width: 100% !important;
    padding-top: 0 !important;
    margin-bottom: 6px;
}

#grSaleEditForm div.DTE_Body div.DTE_Body_Content div.DTE_Field > div.DTE_Field_Input,
#grSaleEditForm div.DTE_Field > div.DTE_Field_Input {
    float: none !important;
    display: block;
    width: 100% !important;
}

#grSaleEditForm .select2-container,
#grSaleEditForm textarea,
#grSaleEditForm input[type="text"],
#grSaleEditForm input[type="url"],
#grSaleEditForm input[type="number"],
#grSaleEditForm input[type="date"],
#grSaleEditForm select {
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
}

@media (max-width: 1100px) {
    #grSaleEditForm .gr-sale-layout > .EVX-Tab-Flex-2,
    #grSaleEditForm .gr-sale-layout > fieldset.EVX-Tab-Flex-2 {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

#gameReferenceEditForm.gr-main-release-active .DTE_Field.DTE_Field_StateDisabled label {
    opacity: 0.7;
}

#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="color"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="date"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="datetime"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="datetime-local"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="email"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="month"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="number"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="password"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="search"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="tel"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="text"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="time"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="url"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field input[type="week"]:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field textarea:disabled,
#gameReferenceEditForm.gr-main-release-active div.DTE_Field select:disabled {
    background: rgba(255,255,255,.06) !important;
    color: rgba(255,255,255,.7) !important;
    border-color: rgba(255,255,255,.12) !important;
    cursor: not-allowed;
    opacity: 1 !important;
}

.arqiv-gr-subrelease-title {
    display: inline-block;
    padding-left: 20px;
    position: relative;
}

.arqiv-gr-subrelease-title::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 50%;
    width: 10px;
    border-top: 1px solid currentColor;
    opacity: 0.6;
}

/* SOQ slot styles moved from PHP */
.arqiv-gr-soq-slot .arqiv-gr-preview{
    cursor:pointer;
}

.arqiv-gr-soq-slot .arqiv-gr-preview img{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
}

.arqiv-gr-soq-slot-empty{
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
    min-height:120px;
    text-align:center;
    padding:8px;
    color:#777;
    font-size:12px;
}

.arqiv-gr-soq-slot .game-reference-image-upload-button[disabled],
.arqiv-gr-soq-slot .game-reference-image-delete-button[disabled]{
    opacity:.45;
    cursor:default;
    pointer-events:none;
}

#gameReferenceEditForm,
#gameReferenceEditForm * {
    box-sizing: border-box;
}

#gameReferenceEditForm {
    max-width: 100%;
}

#gameReferenceEditForm .EVX-Tab,
#gameReferenceEditForm .EVX-Tab-Flex {
    max-width: 100%;
}

#gameReferenceEditForm .EVX-Tab-Flex {
    flex-wrap: wrap;
}

#gameReferenceEditForm fieldset {
    min-width: 320px;
    max-width: 100%;
}

.arqiv-img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.8);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 32px 140px;
    box-sizing: border-box;
    z-index: 99999;
}

.arqiv-img-lightbox img {
    max-width: calc(100vw - 280px);
    max-height: calc(100vh - 64px);
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,.6);
}

.arqiv-img-lightbox .sl-lightbox-nav,
.arqiv-img-lightbox .sl-lightbox-close {
    position: absolute;
    z-index: 3;
    border: 0;
    background: var(--lightbox-control-bg);
    color: var(--lightbox-control-color);
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(0,0,0,.35);
    transition: background-color .18s ease, transform .18s ease;
}

.arqiv-img-lightbox .sl-lightbox-close {
    top: 32px;
    right: 32px;
    width: 46px;
    height: 46px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.arqiv-img-lightbox .sl-lightbox-nav {
    top: 50%;
    transform: translateY(-50%);
    width: 56px;
    height: 56px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
}

.arqiv-img-lightbox .sl-lightbox-prev { left: 32px; }
.arqiv-img-lightbox .sl-lightbox-next { right: 32px; }

.arqiv-img-lightbox .sl-lightbox-nav:hover,
.arqiv-img-lightbox .sl-lightbox-close:hover {
    background: var(--lightbox-control-bg-hover);
}

@media (max-width: 768px) {
    .arqiv-img-lightbox {
        padding: 0;
        background: rgba(0,0,0,.94);
    }

    .arqiv-img-lightbox img {
        width: 100vw;
        height: 100vh;
        max-width: 100vw;
        max-height: 100vh;
        object-fit: contain;
        border-radius: 0;
        box-shadow: none;
    }

    .arqiv-img-lightbox .sl-lightbox-close {
        top: 12px;
        right: 12px;
        width: 44px;
        height: 44px;
    }

    .arqiv-img-lightbox .sl-lightbox-nav {
        width: 52px;
        height: 52px;
    }

    .arqiv-img-lightbox .sl-lightbox-prev {
        left: 12px;
    }

    .arqiv-img-lightbox .sl-lightbox-next {
        right: 12px;
    }
}
