/* Container */
.hplugin-container {
    max-width: 100%;
}

/* Grid */
.hplugin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

/* Card */
.hplugin-card {
    background: #fff;
    border: 1px solid #e1e1e1;
    border-radius: 8px;
    padding: 20px;
    position: relative;
    transition: box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.hplugin-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.hplugin-card.hplugin-card-default {
    border-color: #007cba;
    background-color: #f9fcff;
}

.hplugin-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.hplugin-card-header h3 {
    margin: 0;
    font-size: 1.1em;
}

.hplugin-badge {
    background: #007cba;
    color: #fff;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.8em;
}

.hplugin-card-body {
    flex-grow: 1;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 15px;
}

.hplugin-card-body p {
    margin: 3px 0;
}

.hplugin-card-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.hplugin-card-actions .button {
    font-size: 0.8em;
    padding: 5px 10px;
}

.hplugin-no-addresses {
    grid-column: 1 / -1;
    text-align: center;
    padding: 40px;
    background: #f5f5f5;
    border-radius: 8px;
}

/* Modal */
.hplugin-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.hplugin-modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border: 1px solid #888;
    width: 600px;
    max-width: 100%;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    /* Ensure it handles height gracefully */
    max-height: 90vh;
    overflow-y: auto;
}

.hplugin-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.hplugin-close:hover,
.hplugin-close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Form Styles */
#hplugin-address-form .form-row {
    margin-bottom: 15px;
}

.hplugin-columns-2 {
    display: flex;
    gap: 20px;
}

.hplugin-columns-2 .form-row {
    flex: 1;
    width: auto;
    float: none;
    margin-right: 0;
}

.hplugin-form-actions {
    margin-top: 20px;
    text-align: right;
}

/* Checkout Section - Premium Styling */
.hplugin-checkout-box {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.hplugin-checkout-title {
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #f3f4f6;
    padding-bottom: 15px;
}

.hplugin-checkout-addresses {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.hplugin-address-option {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 16px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    min-height: auto; 
}

/* Radio Button Styling */
.hplugin-address-option input[type="radio"] {
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #2563eb;
}

/* Address Content */
.hplugin-address-details {
    display: flex;
    flex-direction: column;
    width: 100%;
    font-size: 14px;
    line-height: 1.5;
    color: #4b5563;
}

.hplugin-address-details strong {
    color: #111827;
    font-weight: 600;
    font-size: 15px;
    margin-bottom: 4px;
    display: block;
}

.hplugin-addr-summary {
    color: #6b7280;
    font-size: 13px;
    display: block;
    margin-top: 2px;
}

/* Interactions */
.hplugin-address-option:hover {
    border-color: #9ca3af;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transform: translateY(-2px);
    background-color: #fafafa;
}

.hplugin-address-option.selected {
    border-color: #2563eb;
    background-color: #eff6ff;
    box-shadow: 0 0 0 1px #2563eb;
    z-index: 1;
}

.hplugin-address-option.selected .hplugin-address-details strong {
    color: #1e40af;
}

/* Responsive */
@media (max-width: 768px) {
    .hplugin-columns-2 {
        flex-direction: column;
        gap: 0;
    }

    .hplugin-checkout-addresses {
        grid-template-columns: 1fr;
    }
    
    .hplugin-checkout-box {
        padding: 15px;
        margin-bottom: 20px;
    }
}
