/*
 * Copyright Magmodules.eu. All rights reserved.
 * See COPYING.txt for license details.
 */


.mollie-methods-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    padding: 10px;
    border-bottom: 0;

    .section-config {
        border-bottom: 0;
    }
}

.mollie-method-card .entry-edit-head {
    height: 100%;
    box-sizing: border-box;
}

/* Dialog styling */
.mollie-method-card-dialog[open] {
    width: 850px;
    max-width: calc(100vw - 32px);
    height: 80vh;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    border: 0;
    box-shadow: var(--shadow);
    color: var(--text);
    display: flex;
    flex-direction: column;
    overflow: visible;
}

/* Small resets inside the dialog */
.mollie-method-card-dialog fieldset { border: 0; margin: 0; padding: 0; }
.mollie-payment-method-heading {
    font-size: 24px;
    background: var(--bg-card);
    padding: 16px;
    border: 0;
    font-weight: 700;
    margin: 0;
    text-align: left;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
    flex-shrink: 0;

    .mollie-payment-save-config {
        position: absolute;
        top: 0;
        right: 0;
    }

    .mollie-close-button {
        width: 35px;
        height: 35px;
        right: -40px;
        top: -40px;
        cursor: pointer;
        position: absolute;
        background: var(--bg-card);
        border-radius: 100%;
        display: flex;
        align-items: center;
        justify-content: center;

        &:hover {
            background: var(--bg-hover);
        }
    }

    .action-close {
        width: 20px;
        height: 20px;
    }
}

.mollie-method-card-content {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
}

/* Cards */
.mollie-configuration-method-active > .entry-edit-head,
.mollie-configuration-method-inactive > .entry-edit-head {
    position: relative;
    padding: 14px 16px 14px 20px;
    border-radius: var(--border-radius);
    background: var(--bg-card);
    box-shadow: var(--shadow);
    transition: transform .2s ease, box-shadow .2s ease;
    border-bottom: 0;
    color: var(--text);
}

/* Hover */
.mollie-configuration-method-active > .entry-edit-head:hover,
.mollie-configuration-method-inactive > .entry-edit-head:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

/* Focus (accessibility) */
.mollie-configuration-method-active > .entry-edit-head:focus-within,
.mollie-configuration-method-inactive > .entry-edit-head:focus-within {
    outline: 2px solid #a8c86a;
    outline-offset: 2px;
}

/* Indicator inside the box */
.mollie-configuration-method-active > .entry-edit-head::before,
.mollie-configuration-method-inactive > .entry-edit-head::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 6px;
    border-top-left-radius: var(--border-radius);
    border-bottom-left-radius: var(--border-radius);
}

.mollie-configuration-method-active > .entry-edit-head::before {
    background-color: var(--color-active);
}

.mollie-configuration-method-inactive > .entry-edit-head::before {
    background-color: var(--color-inactive);
}

/* First box special rounding */
.entry-edit.form-inline > :first-child .entry-edit-head {
    border-radius: var(--border-radius);
    overflow: hidden;
}
