/**
 * Frontend Styles for WC Gift Packages
 */

/* Container Styles */
.csw-gift-wrapper-container {
    margin: 15px 0;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
}

/* Package Summary Styles */
.gift-packages-summary {
    margin-bottom: 10px;
}

.gift-packages-summary h4,
.gift-packages-summary h5 {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.package-item,
.package-summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin-bottom: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.package-info {
    flex-grow: 1;
    color: #555;
}

.package-actions,
.summary-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.package-actions .btn-link,
.summary-actions .button-link {
    background: none;
    border: none;
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
    font-size: 12px;
    padding: 0;
}

.package-actions .btn-link:hover,
.summary-actions .button-link:hover {
    color: #005177;
}

/* Discrete Link Styles */
.add-gift-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 13px;
    font-weight: normal;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    margin-bottom: 8px;
    padding: 4px 0;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.add-gift-link:hover {
    color: #005177;
    text-decoration: underline;
}

.add-gift-link:focus {
    outline: 1px dotted #0073aa;
    outline-offset: 2px;
}

/* Button Styles */
.add-packages,
.edit-packages {
    background: #e74c3c;
    border: 1px solid #c0392b;
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.add-packages:hover,
.edit-packages:hover {
    background: #c0392b;
    border-color: #a93226;
    color: white;
    text-decoration: none;
}

/* Modal Styles */
.wc-gift-package-modal,
.gift-package-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gift-package-modal[style*="block"] {
    display: block !important;
}

.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.modal-container,
.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.gift-package-form .form-row {
    margin-bottom: 20px;
}

.gift-package-form .form-row-split {
    display: flex;
    gap: 15px;
}

.gift-package-form .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.gift-package-form .form-row-split .form-field {
    margin-bottom: 0;
}

.gift-package-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gift-package-form input[type="text"],
.gift-package-form input[type="number"],
.gift-package-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-package-form input[type="text"]:focus,
.gift-package-form input[type="number"]:focus,
.gift-package-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gift-package-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #666;
    font-size: 11px;
}

.char-counter.over-limit small {
    color: #d63638;
}

.price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.price-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.price-info p:last-child {
    margin-bottom: 0;
}

.price-notice {
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.price-notice small {
    color: #666;
    font-size: 13px;
}

.total-price {
    font-size: 16px !important;
    color: #0073aa;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #005177;
    border-color: #005177;
    color: white;
}

.form-actions .btn-secondary {
    background: white;
    border-color: #ddd;
    color: #666;
}

.form-actions .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #aaa;
    color: #333;
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quantity selector styles */
.gift-package-form .quantity.buttons_added {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    width: 120px;
}

.gift-package-form .quantity.buttons_added input {
    border: none !important;
    text-align: center;
    padding: 8px 5px !important;
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.gift-package-form .quantity.buttons_added .minus,
.gift-package-form .quantity.buttons_added .plus {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: background 0.2s;
}

.gift-package-form .quantity.buttons_added .minus:hover,
.gift-package-form .quantity.buttons_added .plus:hover {
    background: #e9ecef;
    color: #333;
}

.gift-package-form .quantity.buttons_added .minus {
    border-right: 1px solid #ddd;
}

.gift-package-form .quantity.buttons_added .plus {
    border-left: 1px solid #ddd;
}

/* Gift wrap container styles */
.gift-wrap-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

.gift-wrap-summary-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gift-wrap-summary {
    font-size: 13px;
    color: #666;
    background: #f9f9f9;
    padding: 5px 8px;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.gift-wrap-actions {
    font-size: 12px;
}

.gift-wrap-actions a {
    color: #0073aa;
    text-decoration: none;
    margin: 0 2px;
}

.gift-wrap-actions a:hover {
    text-decoration: underline;
}

.gift-wrap-modal {
    margin-top: 15px;
    background: #fff;
    padding: 20px;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.gift-wrap-modal h4 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 16px;
}

.gift-wrap-modal label {
    display: block;
    margin: 10px 0 5px 0;
    font-weight: bold;
    color: #333;
}

.gift-wrap-modal input[type="text"],
.gift-wrap-modal input[type="number"],
.gift-wrap-modal textarea {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gift-wrap-modal textarea {
    resize: vertical;
    font-family: inherit;
}

.wrap-buttons {
    display: flex;
    gap: 10px;
}

.wrap-buttons .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.wrap-confirm {
    background: #e74c3c;
    color: white;
}

.wrap-confirm:hover {
    background: #c0392b;
}

.wrap-cancel {
    background: #95a5a6;
    color: white;
}

.wrap-cancel:hover {
    background: #7f8c8d;
}

.toggle-gift-wrap {
    color: #e74c3c !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.toggle-gift-wrap:hover {
    text-decoration: underline !important;
}

/* Modal Styles */
.wc-gift-package-modal,
.gift-package-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gift-package-modal[style*="block"] {
    display: block !important;
}

.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.modal-container,
.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.gift-package-form .form-row {
    margin-bottom: 20px;
}

.gift-package-form .form-row-split {
    display: flex;
    gap: 15px;
}

.gift-package-form .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.gift-package-form .form-row-split .form-field {
    margin-bottom: 0;
}

.gift-package-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gift-package-form input[type="text"],
.gift-package-form input[type="number"],
.gift-package-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-package-form input[type="text"]:focus,
.gift-package-form input[type="number"]:focus,
.gift-package-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gift-package-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #666;
    font-size: 11px;
}

.char-counter.over-limit small {
    color: #d63638;
}

.price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.price-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.price-info p:last-child {
    margin-bottom: 0;
}

.price-notice {
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.price-notice small {
    color: #666;
    font-size: 13px;
}

.total-price {
    font-size: 16px !important;
    color: #0073aa;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #005177;
    border-color: #005177;
    color: white;
}

.form-actions .btn-secondary {
    background: white;
    border-color: #ddd;
    color: #666;
}

.form-actions .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #aaa;
    color: #333;
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quantity selector styles */
.gift-package-form .quantity.buttons_added {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    width: 120px;
}

.gift-package-form .quantity.buttons_added input {
    border: none !important;
    text-align: center;
    padding: 8px 5px !important;
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.gift-package-form .quantity.buttons_added .minus,
.gift-package-form .quantity.buttons_added .plus {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: background 0.2s;
}

.gift-package-form .quantity.buttons_added .minus:hover,
.gift-package-form .quantity.buttons_added .plus:hover {
    background: #e9ecef;
    color: #333;
}

.gift-package-form .quantity.buttons_added .minus {
    border-right: 1px solid #ddd;
}

.gift-package-form .quantity.buttons_added .plus {
    border-left: 1px solid #ddd;
}

/* Gift wrap container styles */
.gift-wrap-container {
    margin-top: 8px;
    margin-bottom: 8px;
}

.gift-wrap-summary-container {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gift-wrap-summary {
    font-size: 13px;
    color: #666;
    background: #f9f9f9;
    padding: 5px 8px;
    border-radius: 4px;
    border-left: 3px solid #e74c3c;
}

.gift-wrap-actions {
    font-size: 12px;
}

.gift-wrap-actions a {
    color: #0073aa;
    text-decoration: none;
    margin: 0 2px;
}

.gift-wrap-actions a:hover {
    text-decoration: underline;
}

.gift-wrap-modal {
    margin-top: 15px;
    background: #fff;
    padding: 20px;
    border: 2px solid #e74c3c;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    position: relative;
}

.gift-wrap-modal h4 {
    margin-top: 0;
    color: #e74c3c;
    font-size: 16px;
}

.gift-wrap-modal label {
    display: block;
    margin: 10px 0 5px 0;
    font-weight: bold;
    color: #333;
}

.gift-wrap-modal input[type="text"],
.gift-wrap-modal input[type="number"],
.gift-wrap-modal textarea {
    width: 100%;
    max-width: 300px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gift-wrap-modal textarea {
    resize: vertical;
    font-family: inherit;
}

.wrap-buttons {
    display: flex;
    gap: 10px;
}

.wrap-buttons .btn {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.wrap-confirm {
    background: #e74c3c;
    color: white;
}

.wrap-confirm:hover {
    background: #c0392b;
}

.wrap-cancel {
    background: #95a5a6;
    color: white;
}

.wrap-cancel:hover {
    background: #7f8c8d;
}

.toggle-gift-wrap {
    color: #e74c3c !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: bold;
}

.toggle-gift-wrap:hover {
    text-decoration: underline !important;
}

/* Modal Styles */
.wc-gift-package-modal,
.gift-package-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gift-package-modal[style*="block"] {
    display: block !important;
}

.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.modal-container,
.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.gift-package-form .form-row {
    margin-bottom: 20px;
}

.gift-package-form .form-row-split {
    display: flex;
    gap: 15px;
}

.gift-package-form .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.gift-package-form .form-row-split .form-field {
    margin-bottom: 0;
}

.gift-package-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gift-package-form input[type="text"],
.gift-package-form input[type="number"],
.gift-package-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-package-form input[type="text"]:focus,
.gift-package-form input[type="number"]:focus,
.gift-package-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gift-package-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #666;
    font-size: 11px;
}

.char-counter.over-limit small {
    color: #d63638;
}

.price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.price-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.price-info p:last-child {
    margin-bottom: 0;
}

.price-notice {
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.price-notice small {
    color: #666;
    font-size: 13px;
}

.total-price {
    font-size: 16px !important;
    color: #0073aa;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #005177;
    border-color: #005177;
    color: white;
}

.form-actions .btn-secondary {
    background: white;
    border-color: #ddd;
    color: #666;
}

.form-actions .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #aaa;
    color: #333;
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quantity selector styles */
.gift-package-form .quantity.buttons_added {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    width: 120px;
}

.gift-package-form .quantity.buttons_added input {
    border: none !important;
    text-align: center;
    padding: 8px 5px !important;
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.gift-package-form .quantity.buttons_added .minus,
.gift-package-form .quantity.buttons_added .plus {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: background 0.2s;
}

.gift-package-form .quantity.buttons_added .minus:hover,
.gift-package-form .quantity.buttons_added .plus:hover {
    background: #e9ecef;
    color: #333;
}

.gift-package-form .quantity.buttons_added .minus {
    border-right: 1px solid #ddd;
}

.gift-package-form .quantity.buttons_added .plus {
    border-left: 1px solid #ddd;
}

/* Modal Styles */
.wc-gift-package-modal,
.gift-package-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gift-package-modal[style*="block"] {
    display: block !important;
}

.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.modal-container,
.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.gift-package-form .form-row {
    margin-bottom: 20px;
}

.gift-package-form .form-row-split {
    display: flex;
    gap: 15px;
}

.gift-package-form .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.gift-package-form .form-row-split .form-field {
    margin-bottom: 0;
}

.gift-package-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gift-package-form input[type="text"],
.gift-package-form input[type="number"],
.gift-package-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-package-form input[type="text"]:focus,
.gift-package-form input[type="number"]:focus,
.gift-package-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gift-package-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #666;
    font-size: 11px;
}

.char-counter.over-limit small {
    color: #d63638;
}

.price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.price-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.price-info p:last-child {
    margin-bottom: 0;
}

.price-notice {
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.price-notice small {
    color: #666;
    font-size: 13px;
}

.total-price {
    font-size: 16px !important;
    color: #0073aa;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #005177;
    border-color: #005177;
    color: white;
}

.form-actions .btn-secondary {
    background: white;
    border-color: #ddd;
    color: #666;
}

.form-actions .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #aaa;
    color: #333;
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Quantity selector styles */
.gift-package-form .quantity.buttons_added {
    display: inline-flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: white;
    width: 120px;
}

.gift-package-form .quantity.buttons_added input {
    border: none !important;
    text-align: center;
    padding: 8px 5px !important;
    margin: 0 !important;
    flex: 1;
    min-width: 0;
    background: transparent !important;
    box-shadow: none !important;
}

.gift-package-form .quantity.buttons_added .minus,
.gift-package-form .quantity.buttons_added .plus {
    background: #f8f9fa;
    border: none;
    width: 32px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #666;
    transition: background 0.2s;
}

.gift-package-form .quantity.buttons_added .minus:hover,
.gift-package-form .quantity.buttons_added .plus:hover {
    background: #e9ecef;
    color: #333;
}

.gift-package-form .quantity.buttons_added .minus {
    border-right: 1px solid #ddd;
}

.gift-package-form .quantity.buttons_added .plus {
    border-left: 1px solid #ddd;
}

/* Modal Styles */
.wc-gift-package-modal,
.gift-package-modal {
    display: none !important;
    position: fixed !important;
    z-index: 999999 !important;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

.gift-package-modal[style*="block"] {
    display: block !important;
}

.modal-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    width: 100%;
    height: 100%;
}

.modal-container,
.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 15px 20px 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Form Styles */
.gift-package-form .form-row {
    margin-bottom: 20px;
}

.gift-package-form .form-row-split {
    display: flex;
    gap: 15px;
}

.gift-package-form .form-field {
    flex: 1;
    min-width: 0;
    margin-bottom: 20px;
}

.gift-package-form .form-row-split .form-field {
    margin-bottom: 0;
}

.gift-package-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.gift-package-form input[type="text"],
.gift-package-form input[type="number"],
.gift-package-form textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-package-form input[type="text"]:focus,
.gift-package-form input[type="number"]:focus,
.gift-package-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.gift-package-form textarea {
    resize: vertical;
    min-height: 100px;
}

.form-help {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.char-counter {
    text-align: right;
    margin-top: 5px;
}

.char-counter small {
    color: #666;
    font-size: 11px;
}

.char-counter.over-limit small {
    color: #d63638;
}

.price-info {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
}

.price-info p {
    margin: 0 0 8px 0;
    font-size: 14px;
}

.price-info p:last-child {
    margin-bottom: 0;
}

.price-notice {
    padding: 10px 0;
    margin-top: 15px;
    border-top: 1px solid #e9ecef;
    text-align: center;
}

.price-notice small {
    color: #666;
    font-size: 13px;
}

.total-price {
    font-size: 16px !important;
    color: #0073aa;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-actions .btn {
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    border: 1px solid;
    transition: all 0.3s ease;
    min-width: 120px;
}

.form-actions .btn-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: white;
}

.form-actions .btn-primary:hover {
    background: #005177;
    border-color: #005177;
    color: white;
}

.form-actions .btn-secondary {
    background: white;
    border-color: #ddd;
    color: #666;
}

.form-actions .btn-secondary:hover {
    background: #f8f9fa;
    border-color: #aaa;
    color: #333;
}

.form-actions .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Responsive styles */
@media (max-width: 768px) {
    .gift-package-form .form-row-split {
        flex-direction: column;
        gap: 0;
    }
    
    .gift-package-form .form-row-split .form-field {
        margin-bottom: 15px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .form-actions .btn {
        width: 100%;
    }
}

.gift-package-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 13px;
}

.gift-package-form select,
.gift-package-form input[type="number"] {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    background: #fff;
}

.gift-package-form select:focus,
.gift-package-form input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.package-description {
    padding: 10px;
    background: #f0f8ff;
    border: 1px solid #b3d9ff;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 13px;
    color: #555;
}

.package-price-display {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    text-align: right;
    margin-bottom: 15px;
    font-size: 14px;
}

.price-amount {
    color: #e74c3c;
    font-weight: bold;
}

.form-text {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Inline Selector Styles */
.gift-packages-inline-selector {
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px;
    background: #fff;
}

.gift-packages-inline-selector h4 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.package-option {
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 15px;
    background: #f9f9f9;
    transition: all 0.3s ease;
}

.package-option:hover {
    border-color: #0073aa;
    box-shadow: 0 2px 8px rgba(0, 115, 170, 0.1);
}

.package-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.package-header h5 {
    margin: 0;
    font-size: 14px;
    color: #333;
    flex-grow: 1;
}

.package-price {
    font-weight: bold;
    color: #e74c3c;
    font-size: 13px;
}

.package-description {
    margin-bottom: 10px;
    font-size: 12px;
    color: #666;
}

.package-controls {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.package-controls label {
    font-size: 12px;
    margin: 0;
}

.package-quantity {
    width: 60px !important;
    padding: 4px 6px !important;
    font-size: 12px !important;
}

.package-total {
    font-size: 12px;
    color: #333;
}

.total-amount {
    font-weight: bold;
    color: #e74c3c;
}

.inline-actions {
    border-top: 1px solid #e0e0e0;
    padding-top: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grand-total {
    font-size: 16px;
}

.grand-total-amount {
    color: #e74c3c;
    font-weight: bold;
}

/* Notice Styles */
.csw-gift-wrapper-notice {
    padding: 8px 12px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 13px;
}

.csw-gift-wrapper-notice.notice-success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

.csw-gift-wrapper-notice.notice-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}

/* Error States */
.gift-package-form .error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 1px #dc3545 !important;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Body class when modal is open */
body.csw-gift-wrapper-modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-container,
    .modal-content {
        margin: 10px;
        max-width: none;
        width: calc(100% - 20px);
    }
    
    .package-item,
    .package-summary-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .package-actions,
    .summary-actions {
        width: 100%;
        justify-content: flex-start;
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .inline-actions {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }
}

@media (max-width: 480px) {
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 15px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions .button {
        width: 100%;
    }
}
