/*
    MerchStudio Common - Shared User Element Styles
    Copyright (c) 2025 Michael Lewis White and MerchStudio Inc.
    Shared styles for user-related components like the edit modal.

    @package      MerchStudio
    @subpackage   CommonCSS
    @author       Michael L. White <mike@bestsignsupply.com>
    @version      common/css/user.css - 0.01 - 2025-06-23 - totaltec

    #included-by: admin/css_load.tpl
*/

/*
    Styles for the user edit/create modal form are defined here.
    This ensures the form looks the same whether it's triggered from
    the `admin/users.php` page or the "My Account" header link.
*/

/* Styles the icon that appears at the top of the modal. */
.modal_header_icon {
    text-align: center;
    margin-bottom: 15px;
    color: var(--highlight);
}

.modal_header_icon .merch_icon.large {
    width: 48px;
    height: 48px;
}

/* This creates our two-column layout for form groups. */
#user_modal_form .form_row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

#user_modal_form .form_row .form_group {
    flex: 1 1 200px; /* Allows fields to grow but have a base size. */
}

/* Adds consistent spacing between stacked form groups. */
#user_modal_form .form_group {
    margin-bottom: 15px;
}

#user_modal_form hr {
    margin: 15px 0;
    border-color: var(--line);
}

#user_modal_form .form_note {
    font-size: 0.9em;
    color: var(--middle_grey);
    text-align: center;
    margin-top: -5px;
    margin-bottom: 20px;
}

/*
=========================================
User Address Management Styles
=========================================
*/

.user_address_manager {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
}

.address_column {
    flex: 1 1 300px; /* Each column can grow, base width 300px */
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.address_column h3 {
    margin: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.address_list {
    display: flex;
    flex-direction: column;
    gap: 15px;
    min-height: 100px; /* Give it some space even when empty */
}

.address_card {
    background-color: var(--base);
    border: 1px solid var(--line);
    border-radius: 4px;
    transition: box-shadow 0.2s ease-out;
}

.address_card.primary {
    border-left: 3px solid var(--highlight);
}

.address_card_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    border-bottom: 1px solid var(--line);
}

.address_card_header strong {
    color: var(--highlight);
}

.address_actions {
    display: flex;
    gap: 5px;
}

.address_actions .merch_icon {
    padding: 3px;
    border-radius: 3px;
}

.address_card_body {
    padding: 12px;
    font-size: 0.9em;
    line-height: 1.5;
}

.empty_space {
    font-style: italic;
    color: var(--middle_grey);
    padding: 20px;
    text-align: center;
    background-color: var(--base);
    border-radius: 4px;
}