/* Multiple Addresses Styles */

/* Address Summary */
.address-summary {
    display: flex;
    justify-content: space-around;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.summary-item {
    text-align: center;
    flex: 1;
}

.summary-count {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #21533A;
    margin-bottom: 5px;
}

.summary-label {
    font-size: 14px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Section Titles */
.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 30px 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #e9ecef;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.section-title .dashicons {
    color: #21533A;
    font-size: 20px;
}

.address-count {
    background: #21533A;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: normal;
    margin-left: auto;
}

/* Address Selector on Checkout */
.wc-address-selector {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.wc-address-selector h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
}

.address-section {
    margin-bottom: 20px;
}

.address-section h4 {
    margin: 0 0 10px 0;
    color: #555;
    font-size: 14px;
    font-weight: 600;
}

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

.address-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.address-actions .button {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 10px 15px;
    background: #21533A;
    color: white;
    border: none;
    border-radius: 0px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    height: 35px;
}

li.woocommerce-MyAccount-navigation-link.woocommerce-MyAccount-navigation-link--edit-address {
    display: none !important;
}

.address-actions .button:hover,
.address-actions .button:active {
    background: #21533A;
}

.address-actions .button .dashicons {
    font-size: 16px;
}

/* No Addresses State */
.no-addresses {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px dashed #dee2e6;
}

.no-addresses-icon {
    margin-bottom: 20px;
}

.no-addresses-icon .dashicons {
    font-size: 48px;
    color: #6c757d;
}

.no-addresses h3 {
    margin: 0 0 10px 0;
    color: #495057;
    font-size: 20px;
}

.no-addresses p {
    color: #6c757d;
    font-size: 16px;
    margin: 0;
}

/* Address Cards */
.dsads4323 {
    display: flex;
    justify-content: end;
    margin-bottom: 13px;
    gap: 10px;
}

.woocommerce-column.woocommerce-column--shipping-address {
    margin-bottom: 15px;
    padding: 15px 17px 10px;
    background-color: #f9f9f9 !important;
}

.address-card {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.address-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.address-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.address-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
    flex: 1;
}

.address-badges {
    display: flex;
    flex-direction: column;
    gap: 5px;
    align-items: flex-end;
}

.address-type {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.address-type .dashicons {
    font-size: 12px;
}

.address-type.billing {
    background: #e3f2fd;
    color: #1976d2;
}

.address-type.shipping {
    background: #f3e5f5;
    color: #7b1fa2;
}

.default-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #4caf50;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
}

.default-badge .dashicons {
    font-size: 10px;
}

.address-content {
    margin-bottom: 15px;
}

.company-name {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.address-details {
    margin: 0 0 12px 0;
    line-height: 1.5;
    color: #666;
}

.address-details .name {
    font-weight: 600;
    color: #333;
}

.address-details .street,
.address-details .street-2 {
    color: #666;
}

.address-details .city-state {
    color: #666;
}

.address-details .country {
    color: #666;
    font-style: italic;
}

.contact-info {
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0 0 5px 0;
    font-size: 13px;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.contact-info .dashicons {
    font-size: 14px;
    color: #21533A;
}

.contact-info a {
    color: #21533A;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

.address-card .address-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.address-card .address-actions .button {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    font-size: 12px;
    flex: 1;
    min-width: 60px;
    text-align: center;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.address-card .address-actions .edit-address {
    background: #21533A;
    color: white;
    border: none;
}

.address-card .address-actions .edit-address:hover {
    background: #21533A
}

.address-card .address-actions .set-default {
    background: #28a745;
    color: white;
    border: none;
}

.address-card .address-actions .set-default:hover {
    background: #1e7e34;
}

.address-card .address-actions .delete-address {
    background: #dc3545;
    color: white;
    border: none;
}

.address-card .address-actions .delete-address:hover {
    background: #c82333;
}

.address-card .address-actions .dashicons {
    font-size: 12px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background-color: #fff;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #333;
}

#modal-title {
    margin: 0 0 25px 0;
    color: #333;
    font-size: 20px;
    font-weight: 600;
}

/* Form Styles */
/* .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
} */

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 10px;
    border: 1px solid rgba(33, 83, 58, 1);
    border-radius: 0px;
    font-size: 14px;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #21533A;
    box-shadow: 0 0 0 2px rgba(0, 122, 186, 0.2);
}

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #f0f0f0;
}

.form-actions .button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.form-actions .button[type="submit"] {
    background: #21533A;
    color: white;
    border-radius: 0px;
    height: 35px;
    line-height: 0;
}

.form-actions .button[type="submit"]:hover {
    background: #21533A
}

.form-actions .button.cancel {
    background: #6c757d;
    color: white;
    border-radius: 0px;
    height: 35px;
    line-height: 0;
}

.form-actions .button.cancel:hover {
    background: #545b62;
}



#address-form .row{
    display: flex;
    gap: 10px;
}

#address-form .col-12{
    width: 100%;
}

#address-form .col-6{
    width: 50%;
}

/* Responsive Design */
@media (max-width: 768px) {
    .address-summary {
        flex-direction: column;
        gap: 15px;
    }

    .summary-item {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .summary-count {
        margin-bottom: 0;
    }

    .addresses-grid {
        grid-template-columns: 1fr;
    }

    /* .form-row {
        grid-template-columns: 1fr;
    } */

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }

    .address-actions {
        flex-direction: column;
    }

    .address-card .address-actions {
        flex-direction: column;
    }

    .form-actions {
        flex-direction: column;
    }

    .address-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .address-badges {
        flex-direction: row;
        align-items: center;
    }
}

@media (max-width: 480px) {
    .wc-address-selector {
        padding: 15px;
    }

    .address-card {
        padding: 15px;
    }

    .modal-content {
        padding: 15px;
    }

    .section-title {
        font-size: 16px;
    }

    .section-title .dashicons {
        font-size: 18px;
    }
}

/* Loading States */
.button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Success/Error Messages */
.woocommerce-message,
.woocommerce-error {
    padding: 15px;
    margin: 20px 0;
    border-radius: 4px;
    border-left: 4px solid;
}

.woocommerce-message {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.woocommerce-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #21533A;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Ensure the addresses container has relative positioning */
.wc-multiple-addresses {
    position: relative;
}

/* Animation for address cards */
.address-card {
    animation: fadeInUp 0.3s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Modal animation */
.modal.show {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    animation: slideIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}