/**
 * ISC License
 *
 * Copyright (c) 2026 idnovate.com
 * idnovate is a Registered Trademark & Property of idnovate.com, innovación y desarrollo SCP
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice appear in all copies.
 *
 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
 * PERFORMANCE OF THIS SOFTWARE.
 *
 * @author    idnovate
 * @copyright 2026 idnovate.com
 * @license   https://www.isc.org/licenses/ https://opensource.org/licenses/ISC ISC License
 */

/* Global */
.alert {
    display: block;
}

#main .idnovatesupport-products-container .card.page-content {
    padding: 0;
    margin-bottom: 12px;
    border: none;
    box-shadow: none;
}

/* Table Enhancements */
.idnovatesupport-products-container .table td {
    vertical-align: middle;
    padding: 1rem;
}

.idnovatesupport-product-link {
    font-weight: 600;
    color: #232323;
    font-size: 15px;
}

.idnovatesupport-product-link:hover {
    color: #2fb5d2;
    text-decoration: none;
}

.idnovatesupport-product-version,
.idnovatesupport-product-compatibility {
    color: #7a7a7a;
    font-size: 13px;
    margin: 0;
}

/* Badges / Support Validity */
.idnovatesupport-product-support-validity {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    line-height: 1.2;
    padding: 0.3rem 0.7rem;
    font-size: 0.85rem;
    color: #fff;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0;
    font-weight: 600;
}

.idnovatesupport-product-support-validity .fa {
    font-size: 0.9rem;
}

.idnovatesupport-product-support-validity.support-valid .fa {
    color: #1e7b34;
}

.idnovatesupport-product-support-validity.support-expired .fa {
    color: #b02a37;
}

.idnovatesupport-product-support-validity.support-expiring .fa,
.idns-warning .fa {
    color: #c27c0e;
}

.idnovatesupport-product-support-validity.support-valid {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
}

.idnovatesupport-product-support-validity.support-expired {
    color: #721c24;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
}

.idnovatesupport-product-support-validity.support-expiring {
    color: #9a6b16;
    background-color: #fff4e5;
    border: 1px solid #ffe3cf;
}

/* Domain Link */
.idnovatesupport-product-registered-domain {
    display: inline-block;
    font-size: 14px;
    white-space: nowrap;
}

/* Buttons */
.idnovatesupport-actions-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    flex-direction: column;
}

.idnovatesupport-products-container .btn-sm {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
    margin-bottom: 0;
    width: auto;
    min-width: 140px;
    white-space: normal;
    flex: 1 1 auto;
}

/* Specific button overrides if needed */
.idnovatesupport-product-renew-support {
    background-color: #ff0076;
    border-color: #ff0076;
    color: #fff;
}

.idnovatesupport-product-download.btn-secondary {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
}

.idnovatesupport-product-download.btn-secondary:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    color: #000;
}


/* jBox / Modals (Keep existing mostly) */
#module-idnovatesupport-downloads .jBox-container .jBox-title,
#module-idnovatesupport-support .jBox-container .jBox-title {
    font-size: large;
    font-weight: 700;
    background-color: #ff0076;
    color: #fff;
}

#module-idnovatesupport-downloads .jBox-container .jBox-closeButton path,
#module-idnovatesupport-support .jBox-container .jBox-closeButton path {
    fill: #fff;
}

#module-idnovatesupport-downloads .jBox-container .jBox-Confirm-button-submit,
#module-idnovatesupport-support .jBox-container .jBox-Confirm-button-submit {
    background-color: #ff0076;
    border-color: #ff0076;
}

#module-idnovatesupport-downloads .jBox-container .jBox-Confirm-button-cancel,
#module-idnovatesupport-support .jBox-container .jBox-Confirm-button-cancel {
    background: #7a7a7a;
    color: #fff;
}

.idnovatesupport-notice-success .jBox-container {
    background: #4cbb6c !important;
    color: #fff;
}

.idnovatesupport-notice-error .jBox-container {
    background: #ff0076 !important;
    color: #fff;
}

/* Registration Form styles (Keep existing) */
.idnovatesupport-registered-domain-tooltip .jBox-container {
    background: #4cbb6c !important;
    color: #fff;
}

.idnovatesupport-registered-domain-tooltip .jBox-pointer:after {
    background-color: #4cbb6c;
}

.idnovatesupport-register-product-name {
    text-align: left;
    font-weight: 700;
    padding-left: 0;
}

.idnovatesupport-register-product-domain {
    margin-top: 25px;
    width: 100%;
}

#register-domain-modal-domainname::placeholder {
    text-transform: none; /* keeps the placeholder case intact */
}

.idnovatesupport-register-explanation {
    margin-top: 25px;
}

.idnovatesupport-register-product-order-datas {
    margin-top: 18px;
    text-align: left;
}

.idnovatesupport-register-product-order-reference,
.idnovatesupport-register-product-order-date {
    font-size: 0.87rem;
    margin-bottom: 0;
}

/* Order Detail Override */
.page-order-detail .input-group .input-group-btn>label.btn {
    font-size: 0.934rem;
}

.page-order-detail .form-group input#file-upload {
    width: 80%;
    height: 100%;
}

.page-order-detail .messages .message,
#module-idnovatesupport-messages .messages .message {
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    margin-top: 0;
    padding-top: 0.5rem;
}

.page-order-detail .messages .message span.material-icons {
    vertical-align: bottom;
}

/* Images pasted into messages: thumbnail inside the column, full size in a modal (idnovatesupport-front.js) */
.page-order-detail .messages .message .col-sm-8 img,
#module-idnovatesupport-messages .messages .message .col-sm-8 img,
[id^="idnovatesupport_jbox_modal_support_messages_modal_"] .messages .message .col-sm-8 img {
    max-width: 100%;
    max-height: 160px;
    width: auto;
    height: auto;
    padding: 0.25rem;
    margin: 0.25rem 0;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 0.25rem;
    cursor: zoom-in;
}

/* Zoom badge over the thumbnail (wrapper added by idnovatesupport-front.js); clicks go through to the image */
.idnovatesupport-image-thumb {
    position: relative;
    display: inline-block;
    max-width: 100%;
    line-height: 0;
    vertical-align: top;
}

.idnovatesupport-image-zoom {
    position: absolute;
    right: 8px;
    bottom: calc(0.25rem + 8px);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.6) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.4' stroke-linecap='round'%3E%3Ccircle cx='10.5' cy='10.5' r='6.5'/%3E%3Cpath d='M15.5 15.5 21 21M10.5 7.5v6M7.5 10.5h6'/%3E%3C/svg%3E") center / 18px 18px no-repeat;
    pointer-events: none;
    transition: background-color 0.15s ease;
}

.idnovatesupport-image-thumb:hover .idnovatesupport-image-zoom {
    background-color: rgba(0, 0, 0, 0.8);
}

.idnovatesupport-image-modal .jBox-content {
    padding: 0;
    max-width: 90vw;
    max-height: 90vh;
    overflow: auto;
}

.idnovatesupport-image-modal .jBox-content img {
    display: block;
    max-width: 90vw;
    max-height: 90vh;
    width: auto;
    height: auto;
    cursor: zoom-out;
}

.page-order-detail .messages .message .idnovatesupport_message_licensed_to,
.page-order-detail .messages .message .idnovatesupport_message_module {
    font-size: small;
}

/* Messages page (module-idnovatesupport-messages): list and conversation */
#module-idnovatesupport-messages .messages .message {
    padding-bottom: 0.5rem;
}

#module-idnovatesupport-messages .messages .message.idnovatesupport-message-staff {
    background-color: #e9ecef;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-image {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    object-fit: contain;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-icon {
    flex: 0 0 48px;
    width: 48px;
    height: 48px;
    line-height: 48px;
    text-align: center;
    font-size: 1.5rem;
    color: #7a7a7a;
    background: #f1f1f1;
    border-radius: 50%;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-domain {
    font-weight: normal;
    white-space: normal;
    word-break: break-all;
}

#module-idnovatesupport-messages .idnovatesupport-messages-table td {
    vertical-align: middle;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-excerpt {
    display: block;
    max-width: 32rem;
    color: #555;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-count {
    margin-left: 0.25rem;
    color: inherit;
    background: rgba(255, 255, 255, 0.25);
}

#module-idnovatesupport-messages .idnovatesupport-reply-blocked .btn {
    margin-top: 0.25rem;
}

/* File field of the reply form: the native input stays hidden, the label opens it */
#module-idnovatesupport-messages .idnovatesupport-file-input {
    position: absolute;
    clip: rect(0, 0, 0, 0);
    width: 1px;
    height: 1px;
    overflow: hidden;
}

#module-idnovatesupport-messages .input-group .input-group-btn > label.btn {
    margin-bottom: 0;
    font-size: 0.934rem;
}

/* Unread support replies: number on the header "Support" button and in the Messages list */
.idnovatesupport-unread-count {
    display: inline-block;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #e4002b;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    vertical-align: middle;
}

.header-support-btn.idnovatesupport-has-unread {
    position: relative;
}

.header-support-btn.idnovatesupport-has-unread .idnovatesupport-unread-count {
    position: absolute;
    top: -6px;
    left: 50%;
    margin-left: 2px;
    box-shadow: 0 0 0 2px #fff;
    pointer-events: none;
}

#module-idnovatesupport-messages .idnovatesupport-conversation-unread .idnovatesupport-conversation-excerpt {
    font-weight: 700;
    color: #222;
}

/* Read ticks of the customer's messages, as in chat apps: grey sent, blue read by support */
.idnovatesupport-ticks {
    display: inline-block;
    width: 18px;
    height: 12px;
    vertical-align: -1px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='%238c959b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6.5l3.5 3.5L11 2.5'/%3E%3Cpath d='M8 9l1 1 6.5-7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.idnovatesupport-ticks.idnovatesupport-ticks-read {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 12' fill='none' stroke='%2334b7f1' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 6.5l3.5 3.5L11 2.5'/%3E%3Cpath d='M8 9l1 1 6.5-7.5'/%3E%3C/svg%3E");
}

/* Support replies the customer had not seen before opening the conversation */
#module-idnovatesupport-messages .messages .message.idnovatesupport-message-new {
    box-shadow: inset 4px 0 0 #34b7f1;
}

.idnovatesupport-new-label {
    display: inline-block;
    margin-left: 0.25rem;
    padding: 0 6px;
    border-radius: 9px;
    background: #34b7f1;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 18px;
}

/* Demo Links */
.idnovate_demo_links_tabs {
    margin-bottom: 1rem;
}

.idnovate_demo_link_fo i:before {
    content: "\f0b1";
}

.idnovate_demo_link_bo i:before {
    content: "\f108";
}

.btn.idnovate_demo_link_fo,
.btn.idnovate_demo_link_bo {
    background: #1f1f1f;
    color: #ffffff;
    border: solid 4px #1f1f1f;
}

.btn.idnovate_demo_link_fo:hover,
.btn.idnovate_demo_link_bo:hover {
    background: #ffffff;
    color: #1f1f1f;
    border: solid 4px #1f1f1f;
}

.quickview-product-additional-info .idnovate_demo_links_tabs {
    display: none;
}

/* License transfers */
.idns-transfers-received,
.idns-transfers-done {
    margin-bottom: 2rem;
}

.idns-transfers-done {
    margin-top: 2rem;
}

.idns-transfer-note {
    margin: 0.5rem 0 0;
    font-size: 0.9rem;
    color: #6B7280;
}

/* Actions column: one solid primary action, the others outlined, all the same size */
.idnovatesupport-actions-container {
    gap: 0.4rem;
    align-items: stretch;
    min-width: 190px;
}

.idnovatesupport-actions-container .btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    width: 100%;
    min-width: 0;
    min-height: 36px;
    margin: 0;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    text-decoration: none;
    border-width: 1px;
    border-style: solid;
    border-radius: 0;
    box-shadow: none;
}

.idnovatesupport-actions-container .btn .fa {
    font-size: 0.9rem;
}

.idnovatesupport-actions-container .btn-primary {
    background-color: #ff0076;
    border-color: #ff0076;
    color: #fff;
}

.idnovatesupport-actions-container .btn-primary:hover,
.idnovatesupport-actions-container .btn-primary:focus {
    background-color: #e0006a;
    border-color: #e0006a;
    color: #fff;
}

.idnovatesupport-actions-container .btn-secondary {
    background-color: #fff;
    border-color: #d4d4d4;
    color: #222;
}

.idnovatesupport-actions-container .btn-secondary .fa {
    color: #222;
}

.idnovatesupport-actions-container .btn-secondary:hover,
.idnovatesupport-actions-container .btn-secondary:focus,
.idnovatesupport-actions-container .btn-secondary:hover .fa,
.idnovatesupport-actions-container .btn-secondary:focus .fa {
    background-color: #fff;
    border-color: #ff0076;
    color: #ff0076;
}

/* Not available yet (license not registered, support expired) */
.idnovatesupport-actions-container .btn.disabled,
.idnovatesupport-actions-container .btn[disabled] {
    background-color: #f4f4f4;
    border-color: #e2e2e2;
    color: #9a9a9a;
    opacity: 1;
}

.idnovatesupport-actions-container .btn.disabled .fa,
.idnovatesupport-actions-container .btn[disabled] .fa {
    color: #b5b5b5;
}

/* Transfer: set apart from download and contact */
.idns-transfer-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-top: 0.35rem;
    padding-top: 0.6rem;
    border-top: 1px dashed #c8c8c8;
}

.idns-transfer-block form {
    margin: 0;
}

.idns-transfer-pending-note {
    display: block;
    font-size: 0.72rem;
    line-height: 1.3;
    color: #777;
    text-align: center;
}

.idns-transfer-pending-note .fa {
    color: #999;
}

/* Register license, extend or reactivate support: same shape as the action buttons */
.idnovatesupport-product-registered-domain .btn,
.idnovatesupport-product-renew-support {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 36px;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    font-weight: 600;
    line-height: 1.2;
    text-transform: none;
    border: 1px solid #ff0076;
    border-radius: 0;
    box-shadow: none;
    background-color: #ff0076;
    color: #fff;
}

.idnovatesupport-product-registered-domain .btn:hover,
.idnovatesupport-product-renew-support:hover {
    background-color: #e0006a;
    border-color: #e0006a;
    color: #fff;
}

.idnovatesupport-product-renew-support {
    width: 100%;
    margin-top: 0.4rem;
}

/* "Reactivate support" before the license is registered */
.idnovatesupport-product-renew-support.disabled,
.idnovatesupport-product-renew-support.disabled:hover {
    background-color: #f4f4f4;
    border-color: #e2e2e2;
    color: #9a9a9a;
    opacity: 1;
}

/* Order number: visibly a link */
.idnovatesupport-products-table a .idns-date strong,
.idns-transfers-done a .idns-date strong {
    color: #ff0076;
}

.idnovatesupport-products-table a:hover .idns-date strong,
.idns-transfers-done a:hover .idns-date strong {
    text-decoration: underline;
}

/* Transferred licenses: thumbnail next to the module name */
.idns-transferred-module {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.idns-transferred-module .idns-product-thumb {
    width: 48px;
    height: auto;
    flex: 0 0 48px;
}

.idns-transfer-license {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.idns-transfer-license .idns-product-thumb {
    max-width: 60px;
}

.idns-transfer-product {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.idns-transfer-meta {
    margin-bottom: 0;
    font-size: 0.9rem;
}

.idns-transfer-confirm {
    font-weight: normal;
}

.idns-transfer-form .form-footer .btn {
    margin-right: 0.5rem;
}

.idns-mb-0 {
    margin-bottom: 0;
}

/* "Show previous orders": a quiet toggle, and the list in the same format as "Latest order" */
.idnovatesupport-products-table .toggle-orders {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.15rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: #444;
    cursor: pointer;
    text-decoration: none;
    user-select: none;
}

.idnovatesupport-products-table .toggle-orders:hover,
.idnovatesupport-products-table .toggle-orders:focus {
    color: #ff0076;
    text-decoration: none;
}

.idnovatesupport-products-table .toggle-orders .fa {
    width: 0.8em;
    color: inherit;
}

.idnovatesupport-products-table .previous-orders {
    margin: 0 0 0 0.3rem;
    padding: 0 0 0 0.6rem;
    list-style: none;
    border-left: 2px solid #e5e5e5;
}

.idnovatesupport-products-table .previous-orders.idns-open {
    margin-top: 0.35rem;
}

.idnovatesupport-products-table .previous-orders li {
    margin: 0.15rem 0;
    font-size: 0.85rem;
}

/* The theme gives some buttons (renew, disabled) a 4px border with a more specific
   rule; the table class wins over it. One line per button: the column widens instead. */
.idnovatesupport-products-table .idnovatesupport-actions-container .btn,
.idnovatesupport-products-table .idnovatesupport-product-registered-domain .btn,
.idnovatesupport-products-table .idnovatesupport-product-renew-support {
    border-width: 1px;
    white-space: nowrap;
}
