/**
 * Address Book Styles - Improved My Account Layout
 */

/* Checkout styles remain the same */
.wc-address-book-block,
.wc-address-book-shipping-block,
.wc-address-book-billing-block {
    margin-bottom: 24px;
    padding: 15px;
    border-radius: 4px;
    background-color: #fffff9;
    border-color: #c4be89;
    border: 1px solid #d6cd6c;
}

.wc-address-book-block h3,
.wc-address-book-shipping-block h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #b68744;
}

.wc-address-book-billing-block h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
    color: #2c5aa0;
}

.wc-address-book-selector {
    margin-bottom: 15px;
}

.wc-address-book-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.wc-address-book-select {
    width: 100%;
    padding: 4px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    font-size: 14px;
}

.wc-address-book-select:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

.wc-address-book-billing-block {
    background-color: #f5f7fa;
    border-color: #c3d4e7;
}

.wc-address-book-billing-block .wc-address-book-select {
    border-color: #c3d4e7;
}

.wc-address-book-billing-block .wc-address-book-select:focus {
    border-color: #2c5aa0;
    box-shadow: 0 0 0 1px #2c5aa0;
}

/* Enhanced My Account Styles */
.woocommerce-address-book {
    max-width: 1200px;
}

.woocommerce-address-book__header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.woocommerce-address-book__header h2 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.woocommerce-address-book__description {
    color: #666;
    font-size: 16px;
    margin: 0;
    line-height: 1.5;
}

.woocommerce-address-book__actions {
    margin-bottom: 30px;
    text-align: right;
}

.woocommerce-address-book__actions .button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 500;
}

.woocommerce-address-book__actions .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Empty State */
.woocommerce-address-book__empty-state {
    text-align: center;
    padding: 60px 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px dashed #ddd;
}

.woocommerce-address-book__empty-icon {
    font-size: 48px;
    color: #ccc;
    margin-bottom: 20px;
}

.woocommerce-address-book__empty-icon .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
}

.woocommerce-address-book__empty-state h3 {
    margin: 0 0 10px 0;
    color: #666;
}

.woocommerce-address-book__empty-state p {
    color: #888;
    margin-bottom: 25px;
}

/* Address Grid */
.woocommerce-address-book__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

/* Address Cards */
.woocommerce-address-book__card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.woocommerce-address-book__card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #007cba;
}

.woocommerce-address-book__card--default {
    border-color: #ffa500;
    background: linear-gradient(135deg, #fff9e6 0%, #ffffff 100%);
}

.woocommerce-address-book__card--default:hover {
    border-color: #ff8c00;
}

/* Card Header */
.woocommerce-address-book__card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px 20px 0 20px;
    position: relative;
}

.woocommerce-address-book__card-title h3 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.woocommerce-address-book__default-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #ffa500;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.woocommerce-address-book__default-badge .dashicons {
    font-size: 12px;
    width: 12px;
    height: 12px;
}

/* Card Actions Menu */
.woocommerce-address-book__card-actions {
    position: relative;
}

.woocommerce-address-book__card-menu {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    color: #666;
    transition: all 0.2s ease;
}

.woocommerce-address-book__card-menu:hover {
    background: #f0f0f0;
    color: #333;
}

.woocommerce-address-book__card-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 160px;
    display: none;
}

.woocommerce-address-book__card-actions:hover .woocommerce-address-book__card-dropdown {
    display: block;
}

.woocommerce-address-book__card-dropdown a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s ease;
}

.woocommerce-address-book__card-dropdown a:last-child {
    border-bottom: none;
}

.woocommerce-address-book__card-dropdown a:hover {
    background: #f8f9fa;
}

.woocommerce-address-book__card-dropdown .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Card Content */
.woocommerce-address-book__card-content {
    padding: 20px;
    padding-top: 15px;
}

.woocommerce-address-book__address-display {
    line-height: 1.6;
    color: #555;
}

.woocommerce-address-book__phone {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    color: #007cba;
}

.woocommerce-address-book__phone .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

/* Card Footer */
.woocommerce-address-book__card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f8f9fa;
    border-top: 1px solid #f0f0f0;
}

.woocommerce-address-book__usage-text {
    color: #888;
    font-style: italic;
}

.woocommerce-address-book__quick-default {
    background: none;
    border: 1px solid #ddd;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
}

.woocommerce-address-book__quick-default:hover {
    border-color: #ffa500;
    color: #ffa500;
    background: #fff9e6;
}

/* Summary */
.woocommerce-address-book__summary {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 30px;
    text-align: center;
}

.woocommerce-address-book__stat {
    color: #666;
}

/* Help Section */
.woocommerce-address-book__help-section {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.woocommerce-address-book__help-details summary {
    cursor: pointer;
    font-weight: 600;
    color: #333;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.woocommerce-address-book__help-details summary::-webkit-details-marker {
    display: none;
}

.woocommerce-address-book__help-details summary::before {
    content: "▶";
    transition: transform 0.2s ease;
}

.woocommerce-address-book__help-details[open] summary::before {
    transform: rotate(90deg);
}

.woocommerce-address-book__help-content {
    padding: 20px 15px 15px 15px;
}

.woocommerce-address-book__help-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.woocommerce-address-book__help-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.woocommerce-address-book__help-item .dashicons {
    color: #007cba;
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    flex-shrink: 0;
}

.woocommerce-address-book__help-item strong {
    display: block;
    margin-bottom: 4px;
    color: #333;
}

.woocommerce-address-book__help-item p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.4;
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .woocommerce-address-book__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .woocommerce-address-book__actions {
        text-align: center;
    }
    
    .woocommerce-address-book__help-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .woocommerce-address-book__card-header {
        padding: 16px 16px 0 16px;
    }
    
    .woocommerce-address-book__card-content {
        padding: 16px;
        padding-top: 12px;
    }
    
    .woocommerce-address-book__card-footer {
        padding: 12px 16px;
    }
}

@media screen and (max-width: 480px) {
    .woocommerce-address-book__empty-state {
        padding: 40px 20px;
    }
    
    .woocommerce-address-book__header h2 {
        font-size: 20px;
    }
}