/* ============================================================
   WMSA Frontend Styles
   ============================================================ */

/* Address Selector */
.wmsa-address-selector {
    margin-bottom: 15px;
    /*padding: 12px;
    background: #f7f7f7;
    border: 1px solid #ddd;*/
    border-radius: 4px;
}

.wmsa-address-selector label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
}

.wmsa-address-select {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
}

.wmsa-address-link {
    color: #7f54b3;
    text-decoration: underline;
    cursor: pointer;
}

.wmsa-address-link:hover {
    color: #5b3e8a;
}

.wmsa-address-btn {
    display: inline-block;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    transition: opacity 0.2s;
}

.wmsa-address-btn:hover {
    opacity: 0.9;
    color: #fff;
    text-decoration: none;
}

/* Modal */
.wmsa-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99999;
    display: flex;
    align-items: start;
    justify-content: center;
}

.wmsa-modal-content {
    background: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.3);
	margin-top: 20px;
}

.wmsa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
}

.wmsa-modal-header h3 {
    margin: 0;
    font-size: 18px;
}

.wmsa-modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    padding: 0;
    line-height: 1;
}

.wmsa-modal-close:hover {
    color: #333;
}

.wmsa-modal-body {
    padding: 20px;
}

/* Address List (popup) */
.wmsa-address-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.wmsa-address-list li {
    padding: 12px;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.wmsa-address-list li:hover {
    background: #fafafa;
}

.wmsa-addr-label {
    font-weight: 600;
    color: #7f54b3;
}

.wmsa-addr-text {
    flex: 1;
    color: #666;
    font-size: 13px;
}

.wmsa-addr-actions a {
    color: #7f54b3;
    text-decoration: none;
    font-size: 12px;
    margin-left: 8px;
}

.wmsa-addr-actions a:hover {
    text-decoration: underline;
}

.wmsa-add-new-addr {
    margin-top: 10px;
}

/* Address Form */
.wmsa-address-form .wmsa-form-row {
    margin-bottom: 12px;
}

.wmsa-address-form .wmsa-form-row label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
}

.wmsa-address-form .wmsa-form-row input,
.wmsa-address-form .wmsa-form-row select {
    width: 100%;
    padding: 8px;
    border: 1px solid #bbb;
    border-radius: 4px;
}

.wmsa-address-form .wmsa-form-row-first {
    display: inline-block;
    width: 48%;
    margin-right: 2%;
}

.wmsa-address-form .wmsa-form-row-last {
    display: inline-block;
    width: 48%;
}

.wmsa-address-form .required {
    color: red;
}

.wmsa-address-form .button {
    margin-right: 8px;
}

/* Multi-Shipping Checkout */
.wmsa-multi-shipping-checkout {
    margin-bottom: 20px;
    padding: 15px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wmsa-multi-shipping-checkbox label {
    font-weight: 600;
    cursor: pointer;
}

.wmsa-multi-shipping-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.wmsa-multi-shipping-panel {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.wmsa-multi-shipping-notice {
    font-style: italic;
    color: #666;
    margin-bottom: 15px;
}

.wmsa-multi-ship-table {
    width: 100%;
    border-collapse: collapse;
}

.wmsa-multi-ship-table th,
.wmsa-multi-ship-table td {
    padding: 10px;
    border: 1px solid #eee;
    text-align: left;
}

.wmsa-multi-ship-table th {
    background: #f0f0f0;
    font-weight: 600;
}

.wmsa-item-address-select {
    width: 100%;
    max-width: 300px;
    padding: 6px;
}

.wmsa-qty-split {
    font-size: 12px;
    color: #666;
}

.wmsa-qty-input {
    width: 60px;
}

.wmsa-add-ship-addr-link,
.wmsa-multi-pick-link {
    color: #7f54b3;
    text-decoration: underline;
    font-size: 13px;
}

.wmsa-add-ship-addr-link:hover,
.wmsa-multi-pick-link:hover {
    color: #5b3e8a;
}

/* Order meta display */
.wmsa-order-multi-ship {
    margin-top: 10px;
    padding: 10px;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.wmsa-order-multi-ship h4 {
    margin: 0 0 8px;
}

.wmsa-order-address,
.wmsa-order-item-address {
    margin-bottom: 8px;
    padding: 6px 0;
    border-bottom: 1px dotted #ddd;
}

/* Thank you page multi-shipping display */
.wmsa-order-multi-ship.wmsa-thankyou {
    margin-top: 20px;
    padding: 15px;
}

.wmsa-order-multi-ship.wmsa-thankyou h3 {
    margin: 0 0 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.wmsa-order-multi-ship.wmsa-thankyou .wmsa-order-item-address {
    padding: 8px 10px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 10px;
}

/* Item shipping address in order details */
.wmsa-item-ship-address {
    margin: 4px 0;
    padding: 4px 8px;
    border-left: 3px solid #7f54b3;
    font-size: 12px;
    line-height: 1.5;
}

/* ============================================================
   My Account — Address Book
   ============================================================ */

.wmsa-address-book {
    max-width: 900px;
}

.wmsa-address-section {
    margin-bottom: 30px;
}

.wmsa-address-section h2 {
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #eee;
}

.wmsa-addresses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.wmsa-address-card {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.wmsa-address-card:hover {
    border-color: #7f54b3;
    box-shadow: 0 1px 4px rgba(127, 84, 179, 0.15);
}

.wmsa-address-card.wmsa-is-default {
    border-color: #7f54b3;
    border-width: 2px;
    background: #fcfaff;
}

.wmsa-address-card.wmsa-add-new {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px dashed #ddd;
    background: #fafafa;
    min-height: 120px;
}

.wmsa-address-card.wmsa-add-new:hover {
    border-color: #7f54b3;
}

.wmsa-add-new-btn {
    text-align: center;
    text-decoration: none;
    color: #7f54b3;
}

.wmsa-add-new-btn .wmsa-plus {
    display: block;
    font-size: 28px;
    font-weight: 300;
    line-height: 1;
    margin-bottom: 4px;
}

.wmsa-address-label {
    font-weight: 600;
    font-size: 14px;
    color: #333;
    margin-bottom: 6px;
}

.wmsa-default-badge {
    display: inline-block;
    background: #7f54b3;
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wmsa-address-content {
    font-size: 13px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.wmsa-address-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.wmsa-address-actions a {
    font-size: 12px;
    text-decoration: none;
    color: #7f54b3;
    padding: 3px 8px;
    border: 1px solid #7f54b3;
    border-radius: 3px;
    transition: all 0.2s;
}

.wmsa-address-actions a:hover {
    background: #7f54b3;
    color: #fff;
}

.wmsa-address-actions .wmsa-default-btn {
    border-color: #46b450;
    color: #46b450;
}

.wmsa-address-actions .wmsa-default-btn:hover {
    background: #46b450;
    color: #fff;
}

.wmsa-address-actions .wmsa-delete-btn {
    border-color: #dc3232;
    color: #dc3232;
}

.wmsa-address-actions .wmsa-delete-btn:hover {
    background: #dc3232;
    color: #fff;
}

.wmsa-address-book-link {
    margin-top: 10px;
}

.wmsa-address-book-link a {
    color: #7f54b3;
    text-decoration: underline;
}
