/* =============================================================================
   Purchase Form Modal — Styles extracted from purchaseformmodal.blade.php
   Included on-demand via @push('styles') in the modal partial.
   Colors aligned with the pgModeler dark theme (modern-ui.css palette).
   ============================================================================= */

/* Adjust modal width for better card appearance */
@media (min-width: 992px) {
    #purchaseFormModal .modal-lg {
        width: 90%;
        max-width: 880px;
    }
}

/* Remove extra margins from PayPal button container */
#paypal-button-container {
    margin: 0 !important;
    margin-bottom: -5px !important;
    padding: 0 !important;
}
#paypal-button-container > div {
    margin: 0 !important;
}

/* Ensure consistent height for payment method containers */
.payment-method-container {
    min-height: 45px;
}

/* Align payment actions */
.payment-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    width: 100%;
}

.refund-policy-note {
    font-size: 90%;
    margin: 0;
    line-height: 1.4;
    padding: 10px 12px;
    text-align: left;
}

/* Compact reCAPTCHA */
#recaptcha-container-btcpayment {
    width: 100%;
    max-width: 268px;
    min-height: 70px;
    overflow: hidden;
    margin-top: 18px;
}
#recaptcha-container-btcpayment > div {
    transform: scale(0.80);
    transform-origin: left top;
}

/* Payment section headers */
/* Wells da coluna direita: sem sombra */
#purchaseFormModal .well {
    box-shadow: none !important;
}

/* Card de preço: estilo input escuro (igual ao #amountDiv no donate) */
#price-simple-container {
    padding: 16px;
    text-align: center;
    margin-bottom: 15px;
    background:       #1a2535 !important;
    background-color: #1a2535 !important;
    border:           1px solid var(--pgm-border) !important;
    box-shadow:       none !important;
}
#price-simple {
    font-size: 32px;
    font-weight: 700;
    color: #3d9858;
    line-height: 1.2;
    margin-bottom: 4px;
}
#price-simple .currency {
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    padding: 0;
}
#price-per-seat {
    font-size: 14px;
    color: #7a90a8;
    margin-bottom: 8px;
}

.price-details-trigger {
    display: inline-block;
    color: #4a8dd0;
    font-size: 13px;
    cursor: pointer;
    transition: color 0.2s;
    text-decoration: none;
    border: none;
    background: none;
    padding: 4px 8px;
}
.price-details-trigger:hover {
    color: #6ba8e0;
    text-decoration: underline;
}

/* Popover styling for price details */
.price-details-popover {
    max-width: 360px;
    width: 360px;
    background-color: var(--pgm-card-bg, #2b3a4d) !important;
    border: 1px solid var(--pgm-border, #3a4d62) !important;
    box-shadow: 0 4px 16px rgba(0,0,0,0.5) !important;
    border-radius: 8px !important;
    color: var(--pgm-text, #d8e6f3) !important;
}
.price-details-popover.bottom > .arrow::after,
.price-details-popover.bottom > .arrow {
    border-bottom-color: var(--pgm-border, #3a4d62) !important;
}
.price-details-popover.top > .arrow::after,
.price-details-popover.top > .arrow {
    border-top-color: var(--pgm-border, #3a4d62) !important;
}
.price-details-popover .popover-title {
    background-color: #1e2b3a;
    border-bottom: 1px solid #3a4d62;
    color: #c5d4e5;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 12px;
}
.price-details-popover .popover-content {
    padding: 0;
    font-size: 13px;
}
.price-details-popover .price-breakdown-items {
    display: block;
    padding: 4px 0;
    margin: 0;
}
.price-details-popover .price-breakdown-items > div {
    padding: 5px 12px;
    border-bottom: 1px solid #3a4d62;
    line-height: 1.5;
    overflow: hidden;
    clear: both;
}
.price-details-popover .price-breakdown-items > div:first-child {
    padding-top: 6px;
}
.price-details-popover .price-breakdown-items > div:last-child {
    border-bottom: none;
    padding-bottom: 6px;
}
.price-details-popover .singlePrice {
    font-size: 15px;
}
.price-details-popover .otherPrice {
    font-size: 14px;
}
.price-details-popover strong {
    font-weight: 600;
}
.price-details-popover strong.pull-right {
    float: right;
}
.price-details-popover .final-price {
    background-color: #1e2b3a;
    color: #c5d4e5;
    font-weight: 600;
    font-size: 14px;
    padding: 10px 12px;
    border-top: 2px solid #3a4d62;
}
.price-details-popover .final-price .currency {
    color: #4a8dd0;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    text-align: right;
    display: inline;
}
.price-details-popover .green-text {
    color: #3d9858;
    font-weight: 600;
}
.price-details-popover .blue-text {
    color: #4a8dd0;
    font-weight: 600;
}
.price-details-popover .orange-text {
    color: #c8a020;
    font-weight: 600;
}

/* Purchase profile cards */
.purchase-profile-card {
    border: 1px solid #3a4d62;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    transition: border-color .2s ease, box-shadow .2s ease, color .2s ease;
    cursor: pointer;
}

/* Tier cards dentro do grupo simple: inativos com borda e texto esmaecidos */
.purchase-profile-group-card.group-simple .purchase-profile-card {
    border-color: #2a5c3a;
}
.purchase-profile-group-card.group-simple .purchase-profile-card h5 {
    color: #4a7a5a;
    transition: color .2s ease;
}
.purchase-profile-group-card.group-simple .purchase-profile-card em,
.purchase-profile-group-card.group-simple .purchase-profile-card small {
    color: #4a7a5a !important;
    transition: color .2s ease;
}
.purchase-profile-group-card.group-simple .purchase-profile-card:hover h5 {
    color: var(--pgm-text, #d8e6f3);
}
.purchase-profile-group-card.group-simple .purchase-profile-card:hover em,
.purchase-profile-group-card.group-simple .purchase-profile-card:hover small {
    color: #94adc4 !important;
}
/* Ativo restaura cor normal */
.purchase-profile-group-card.group-simple .purchase-profile-card.active h5 {
    color: var(--pgm-text, #d8e6f3);
}
.purchase-profile-group-card.group-simple .purchase-profile-card.active em,
.purchase-profile-group-card.group-simple .purchase-profile-card.active small {
    color: #94adc4 !important;
}
.purchase-profile-group-card {
    background: #2b3a4d;
    border: 1px solid #3a4d62;
    border-left: 5px solid #3a4d62;
    border-radius: 12px;
    box-shadow: none;
    margin-bottom: 0;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 14px;
    cursor: pointer;
}
.purchase-profile-group-card.group-simple {
    border-color: #3d9858;
    border-left-color: #4ecb72;
    background-color: #1f4230;
}
.purchase-profile-group-card.group-simple:hover {
    border-color: #4ecb72;
    border-left-color: #6ed890;
    background-color: #265238;
}
.purchase-profile-group-card.group-simple.active {
    border-color: #4ecb72;
    border-left-color: #6ed890;
    background-color: #265238;
}
.purchase-profile-group-card.group-custom {
    border-color: #4a8dd0;
    border-left-color: #7ab8f0;
    background-color: #1c3558;
    cursor: default;
}
.purchase-profile-group-card.group-custom.active {
    border-color: #7ab8f0;
    border-left-color: #9dceff;
    background-color: #1f3d66;
}
.purchase-profile-card:hover {
    border-color: #4a8dd0;
}
.purchase-profile-group-card.group-simple .purchase-profile-card:hover {
    border-color: #4ecb72;
}
.purchase-profile-card.active {
    border-color: #4a8dd0;
}
.purchase-profile-group-card.group-simple .purchase-profile-card.active {
    border-color: #3d9858;
}
.simple-profile-card.active {
    border-color:     #3d9858;
    border-top-color: #4ecb72;
    background-color: #2d6040;
}
.purchase-profile-group-card.active {
    transform: translateY(-1px);
}
.purchase-profile-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
}
#custom-config-row-1.disabled-fields {
    opacity: 0.55;
    pointer-events: none;
}
.purchase-profile-card h5 {
    margin-top: 0;
    margin-bottom: 4px;
    font-weight: 700 !important;
}
.purchase-profile-card p,
.purchase-profile-card em,
.purchase-profile-card small,
#custom-config-row-1 em,
#custom-config-row-1 small {
    margin: 0;
    color: #94adc4 !important;
    font-size: 90%;
    line-height: 1.35;
}
.purchase-profile-group-card .plan-group-title {
    margin-top: 0;
    margin-bottom: 4px;
    font-weight: 700 !important;
}
.purchase-profile-group-card .plan-title-wrap {
    border-bottom: 1px solid #3a4d62;
    margin-bottom: 10px;
    padding-bottom: 8px;
}
.purchase-profile-group-card.group-simple .plan-title-wrap {
    border-bottom-color: rgba(61, 152, 88, 0.4);
}
.purchase-profile-group-card.group-custom .plan-title-wrap {
    border-bottom-color: rgba(90, 172, 255, 0.3);
}
.purchase-profile-group-card .plan-title-wrap .plan-group-title {
    margin-bottom: 0;
}
.purchase-profile-group-card .plan-group-title {
    color: #7a90a8;
}
.purchase-profile-group-card.group-simple.active .plan-group-title {
    color: #3d9858;
}
.purchase-profile-group-card.group-custom.active .plan-group-title {
    color: #4a8dd0;
}
.purchase-profile-platform {
    margin-top: 10px;
}

/* Custom config row border */
#custom-config-row-1 > p {
    border-bottom: 1px solid rgba(90, 172, 255, 0.3) !important;
}

/* hr dentro do card custom: mesma cor de borda */
#custom-profile-group-card hr {
    border-color: rgba(90, 172, 255, 0.3) !important;
}

/* Botões no card custom: fundo azul-escuro próximo ao card, mas não igual */
#custom-profile-group-card .btn-default,
#custom-profile-group-card .spinner-plus,
#custom-profile-group-card .spinner-minus,
#custom-profile-group-card .btn-pkg {
    background:       #1a3050 !important;
    background-color: #1a3050 !important;
    border-color:     rgba(74, 141, 208, 0.45) !important;
    color:            var(--pgm-text) !important;
}
#custom-profile-group-card .btn-default:hover,
#custom-profile-group-card .spinner-plus:hover,
#custom-profile-group-card .spinner-minus:hover,
#custom-profile-group-card .btn-pkg:hover {
    background:       #243d66 !important;
    background-color: #243d66 !important;
    border-color:     #7ab8f0 !important;
    color:            #ffffff !important;
}
#custom-profile-group-card .btn-pkg.btn-pkg-checked,
#custom-profile-group-card .btn-pkg.btn-pkg-checked:hover,
#custom-profile-group-card .btn-pkg.btn-pkg-checked:focus {
    background:       var(--pgm-primary) !important;
    background-color: var(--pgm-primary) !important;
    border-color:     #7ab8f0 !important;
    color:            #ffffff !important;
}

/* Height alignment: flexbox on desktop */
@media (min-width: 992px) {
    #purchase-form > .col-md-7,
    #purchase-form > .col-md-5 {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #purchase-form > .col-md-7 > .row {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    #purchase-form > .col-md-7 > .row > .col-md-12 > .form-group > .row {
        display: flex;
        flex: 1;
        margin-left: -15px;
        margin-right: -15px;
    }
    #purchase-form > .col-md-7 > .row > .col-md-12 > .form-group > .row > .col-md-6 {
        display: flex;
        flex-direction: column;
    }
    .purchase-profile-group-card {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
    .purchase-profile-group-card #custom-config-row-1 {
        flex: 1;
        display: flex;
        flex-direction: column;
    }
    #purchase-form > .col-md-5 > .form-group {
        flex: 0 0 auto;
        margin-bottom: 15px;
    }
    #purchase-form > .col-md-5 > .well {
        flex: 1;
        display: flex;
        flex-direction: column;
        margin-bottom: 0;
    }
}

/* Mobile: block layout */
@media (max-width: 991px) {
    .purchase-profile-group-card {
        display: block;
    }
}

/* Custom card platform/expires layout */
#custom-config-row-1 > .row {
    margin-bottom: 8px;
}
@media (max-width: 767px) {
    #custom-config-row-1 > .row > .col-sm-7,
    #custom-config-row-1 > .row > .col-sm-5 {
        margin-bottom: 10px;
    }
    #custom-config-row-1 > .row > .col-sm-5:last-child {
        margin-bottom: 0;
    }
}

/* Card navigation visibility */
#custom-profile-group-card {
    display: none;
}
#custom-profile-group-card.mobile-visible {
    display: block;
}
@media (min-width: 992px) {
    #custom-profile-group-card.mobile-visible {
        display: flex;
        flex-direction: column;
        flex: 1;
    }
}
#simple-plans-group-card.mobile-hidden {
    display: none;
}

/* Card column visibility helpers */
.col-md-6.card-col-hidden {
    display: none !important;
}
.col-md-6.card-col-full {
    width: 100% !important;
    flex: 0 0 100% !important;
    max-width: 100% !important;
}

/* Card fade animations */
@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0); }
}
.col-md-6.card-fade-out {
    animation: fadeOut 0.3s ease-out forwards;
}
.col-md-6.card-fade-in {
    animation: fadeIn 0.3s ease-out forwards;
}

/* Card navigation buttons — mesmo estilo do btn-blog-read: sem pill, sem glow, sem translateX */
.card-nav-btn {
    display:       block;
    width:         100%;
    margin-top:    20px;
    padding:       10px 28px;
    border:        1px solid #4a8dd0;
    background:    #4a8dd0;
    color:         #ffffff;
    font-size:     14px;
    font-weight:   500;
    border-radius: 6px;
    cursor:        pointer;
    transition:    all 0.3s ease;
    text-align:    center;
}
.card-nav-btn:hover {
    background:   #3a7dc0;
    border-color: #3a7dc0;
    color:        #ffffff;
}
.card-nav-btn .fa-arrow-right {
    margin-left: 8px;
    transition:  margin-left 0.3s ease;
}
.card-nav-btn:hover .fa-arrow-right {
    margin-left: 12px;
}
.card-nav-btn .fa-arrow-left {
    margin-right: 8px;
    transition:   margin-right 0.3s ease;
}
.card-nav-btn:hover .fa-arrow-left {
    margin-right: 12px;
}

#show-custom-card-btn {
    border-color: #3d9858;
    background:   #3d9858;
    color:        #ffffff;
}
#show-custom-card-btn:hover {
    background:   #2d7a44;
    border-color: #2d7a44;
}

#payment-gateway-selector .btn,
#currency-selector .btn {
    white-space: nowrap;
}

/* Spinner input group */
.spinner .input-group-addon {
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0;
    white-space: nowrap;
}
.spinner .input-group-addon .btn {
    margin: 0;
    border-radius: 0;
}
.spinner .input-group-addon .spinner-minus {
    border-top-right-radius: 4px !important;
    border-bottom-right-radius: 4px !important;
}
.spinner .input-group-addon .btn + .btn {
    margin-left: -1px;
}
.spinner-plus:hover,
.spinner-minus:hover,
.spinner-plus:focus,
.spinner-minus:focus,
.spinner-plus:focus-visible,
.spinner-minus:focus-visible,
.spinner-plus:active,
.spinner-minus:active {
    transform: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-color: #3a4d62 !important;
}

/* Quote/Payment toggle — modal header */
#purchaseFormModal .modal-header {
    position: relative;
}
.modal-mode-toggle {
    position: absolute;
    right: 52px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 13px;
    z-index: 10;
}
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 42px;
    height: 22px;
    margin: 0;
    vertical-align: middle;
}
.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}
.slider-toggle {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4a8dd0;
    border-radius: 22px;
    transition: background-color .2s;
}
.slider-toggle:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: transform .2s;
}
.switch-toggle input:checked + .slider-toggle {
    background-color: #3d9858;
}
.switch-toggle input:checked + .slider-toggle:before {
    transform: translateX(20px);
}
#mode-label-payment { font-weight: 600; color: #4a8dd0; }
#mode-label-quote   { font-weight: 400; color: #7a90a8; }
#purchaseFormModal.quote-mode #mode-label-payment { font-weight: 400; color: #7a90a8; }
#purchaseFormModal.quote-mode #mode-label-quote   { font-weight: 600; color: #3d9858; }

/* Modal footer dark */
#purchaseFormModal .modal-footer {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid #3a4d62;
    background-color: #1e2b3a;
}

/* Reduce spacing between cards and footer */
#purchaseFormModal .modal-body {
    padding-bottom: 5px;
}
#purchaseFormModal .modal-footer .alert-info {
    flex-shrink: 0;
}
#purchaseFormModal .modal-footer #recaptcha-container-btcpayment {
    margin: 0;
}
#purchaseFormModal .modal-footer #payment-mode-actions,
#purchaseFormModal .modal-footer #quote-mode-actions {
    margin: 0;
}
#purchaseFormModal .modal-footer .payment-actions {
    justify-content: flex-end;
}
