/* Gift Card customer account page — reduce gap between H1 and content */
.awgiftcard-card-index .page-title-wrapper {
    margin-bottom: 15px;
}
.awgiftcard-card-index .page-title-wrapper .page-title {
    margin-bottom: 15px;
}

/* Gift Card Product description */
.aw-gc-product-form-description {
    margin-bottom: 30px;
}

/* Gift Card Product form options */
.aw-gc-product-add-form {
    clear: both !important;
    margin-top: 20px;
    padding-top: 0 !important;
}
.aw-gc-product-form-options {
    margin-bottom: 40px;
}
.page-product-giftcard .aw-gc-product-add-form .product-info-price {
    float: none;
}
.aw-gc-product-form-options .fieldset .legend {
    margin-left: 0;
}
.aw-gc-product-form-options__field-full-width {
    display: block !important;
    padding-right: 0 !important;
    width: 100% !important;
}
@media (min-width: 768px), print{
    .page-product-giftcard .product-add-form .field:not(.text):nth-child(odd) {
        padding-right: 25px;
    }

    .page-product-giftcard .product-add-form .field:not(.text) {
        margin: 0 0 20px;
        padding: 0 12px 0 0;
        box-sizing: border-box;
        display: inline-block;
        width: 50%;
        vertical-align: top;
    }
}
.aw-gc-product-form-options__step-number {
    display: inline-block;
    margin-right: 10px;
    width: 20px;
    height: 20px;
    border: 1px solid #333;
    border-radius: 11px;
    text-align: center;
    font-size: 1.6rem;
}
.aw-gc-product-form-options__amount-control {
    display: inline-block;
    box-sizing: border-box;
    margin-bottom: 0 !important;
    width: 50%;
    vertical-align: top;
}
.aw-gc-product-form-options__amount-control:last-child {
    padding-left: 25px;
}
.aw-gc-product-form-options__template-options {
    overflow: hidden;
}
.aw-gc-product-form-options__template-option {
    float: left;
    margin: 2px;
    width: 150px;
    height: 112px;
    border: 3px solid transparent;
    text-align: center;
    overflow: hidden;
    cursor: pointer;
}
.aw-gc-product-form-options__template-option.selected,
.aw-gc-product-form-options__template-option:hover {
    border-color: #62bcf7;
    text-decoration: none;
}
.aw-gc-product-form-options__template-image {
    max-width: 100%;
    max-height: 100%;
    vertical-align: middle;
}
.aw-gc-product-form-options__template-name {
    display: block;
    line-height: 112px;
    background: #f0f0f0;
}
.aw-gc-product-form-options__template-name,
.aw-gc-product-form-options__template-name:hover {
    color: #8f8f8f;
}
.aw-gc-product-form-options__email {
    margin-top: 30px;
}
#aw_gc_recipient_name-error, #aw_gc_sender_name-error {
    position: absolute;
}
.aw-gc-product-form-options__fromto, .aw-gc-product-form-options__delivery-date {
    margin-bottom: 20px !important;
}
.aw-gc-product-form-options__delivery-date .control.delivery-date-name button {
    height: 3.2rem;
    margin-left: -3.2rem;
    overflow: hidden;
    position: absolute;
    margin-top: -2px;
}
.aw-gc-product-form-options__email-content + .aw-gc-product-form-options__preview {
    margin-top: 20px;
}
.aw-gc-product-form-options__email-content textarea {
    vertical-align: top;
}
.page-product-giftcard .ui-timepicker-div dl dt {
    height: auto;
    margin-bottom: 0;
}
.page-product-giftcard .ui-timepicker-div dl dd {
    margin: 0;
}

/* Gift Card customer account page — shared layout */

/* Section spacing: 30px between sections */
#aw_giftcard__code_info_block {
    margin-bottom: 30px;
}
.aw-giftcard-codes-block {
    margin-bottom: 30px;
}
.page-main .block.aw-giftcard-codes-block {
    margin-bottom: 30px;
}

/* Section title → table gap: 5px */
#aw_giftcard__code_info_block .block-title,
.aw-giftcard-codes-block .block-title {
    margin-bottom: 5px;
}
#aw_giftcard__code_info_block .block-content {
    margin: 0;
}

/* Section title typography */
.aw-giftcard-codes-block .block-title span,
#aw_giftcard__code_info_block .block-title span,
#aw_giftcard__code_info .block-title span {
    font-size: 2.2rem;
    font-weight: 300;
}

/* Table base */
#aw_giftcard__code_info_block table,
.aw-giftcard-codes-block table {
    border-collapse: collapse;
}

/* All td vertical alignment and row spacing */
#aw_giftcard__code_info_block table td,
.aw-giftcard-codes-block table td {
    vertical-align: middle;
    padding: 4px 8px 4px 0;
    white-space: nowrap;
}

/* Account page: fixed layout so both tables share column alignment */
.awgiftcard-card-index #aw_giftcard__code_info_block table,
.awgiftcard-card-index .aw-giftcard-codes-block table {
    table-layout: fixed;
    width: 100%;
}
.awgiftcard-card-index #aw_giftcard__code_info_block table td:nth-child(1),
.awgiftcard-card-index .aw-giftcard-codes-block table td:nth-child(1) {
    width: 200px;
}
.awgiftcard-card-index #aw_giftcard__code_info_block table td:nth-child(2),
.awgiftcard-card-index .aw-giftcard-codes-block table td:nth-child(2) {
    width: 120px;
}

/* Balance column bold */
.aw-giftcard-codes-block td.balance {
    font-weight: 600;
}

/* Checkout page: compact table, auto-width columns, reduced padding */
.checkout-index-index .aw-giftcard-codes-block table {
    table-layout: auto;
    width: auto;
}
.checkout-index-index .aw-giftcard-codes-block table td {
    padding: 4px 16px 4px 0;
}

/* Cart and checkout: hide Show barcode column everywhere except account page */
.checkout-cart-index .aw-giftcard-codes-block td.giftcard-barcode-action,
.checkout-cart-index #aw_giftcard__code_info_block td.giftcard-barcode-action,
.checkout-index-index .aw-giftcard-codes-block td.giftcard-barcode-action,
.checkout-index-index #aw_giftcard__code_info_block td.giftcard-barcode-action {
    display: none;
}

/* Row spacing: 8px via vertical padding on td (4px top + 4px bottom = 8px gap) */

/* Gift Card fieldset check on customer account */
.fieldset.aw_giftcard__check {
    margin-bottom: 15px;
}

#aw_giftcard__check_code_form .actions-toolbar {
    margin-bottom: 20px;
}

/* Remove box wrapper constraints */
#aw_giftcard__code_info_block .box,
.aw-giftcard-codes-block .box {
    width: 100%;
}

/* Gift Card block on checkout page */
.aw-giftcard-totals .action-delete {
    color: #333333;
    border: none;
    background: none;
    box-shadow: none;
    padding: 0;
    font-weight: 400;
    line-height: 1.42857143;
    font-size: 1.4rem;
    font-style: normal;
    vertical-align: top;
    cursor: pointer;
}
.aw-giftcard-totals .action-delete .delete-icon::before {
    content: '\e604';
    font-family: 'luma-icons';
}
.opc-wrapper .form-aw-giftcard {
    max-width: 500px;
}
.aw-giftcart__multishipping-container {
    margin-top: 10px;
}
.aw-giftcart__multishipping-container .title strong {
    font-size: 1.6rem;
    font-weight: 400;
    color: #1979c3;
}

/* Show barcode button */
.aw-giftcard-show-barcode-btn {
    display: inline-block;
    margin-left: 12px;
    padding: 0;
    background: none;
    border: none;
    color: #1979c3;
    font-size: 1.4rem;
    font-weight: 400;
    cursor: pointer;
    text-decoration: none;
    vertical-align: middle;
}
.aw-giftcard-show-barcode-btn:hover,
.aw-giftcard-show-barcode-btn:focus,
.aw-giftcard-show-barcode-btn:active {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    color: #1979c3 !important;
    text-decoration: underline;
    outline: none;
}

/* Barcode modal — centered on screen, compact width */
.aw-giftcard-barcode-modal-wrap .modal-inner-wrap {
    width: 300px !important;
    max-width: 300px !important;
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
}
.aw-giftcard-barcode-modal-wrap .modal-header {
    padding-bottom: 0;
    min-height: 0;
}
.aw-giftcard-barcode-modal-wrap .modal-title {
    display: none;
}

/* Barcode modal content */
.aw-giftcard-barcode-modal__content {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 16px 8px;
    gap: 10px;
}
.aw-giftcard-barcode-modal__img {
    width: 240px;
    height: auto;
    object-fit: contain;
}
.aw-giftcard-barcode-modal__code {
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    letter-spacing: 0.05em;
    text-align: center;
}

/* Close button centered at the bottom */
.aw-giftcard-barcode-modal-wrap .modal-footer {
    display: flex;
    justify-content: center;
    padding: 12px 16px 20px;
    border-top: none;
}

