/**
 * Admin styles for Auto Capitalize & UPPERCASE Names and Addresses
 *
 * @since   2.1.0
 * @updated 2.2.0 - Complete UI redesign
 */

/* ==========================================================================
   Layout
   ========================================================================== */

.ayudawp-acn-wrap {
    max-width: 1400px;
}

.ayudawp-acn-row {
    display: flex;
    gap: 20px;
    margin: 20px 0 30px;
    align-items: stretch;
}

.ayudawp-acn-col {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.ayudawp-acn-col > .ayudawp-acn-card {
    flex: 1;
}

/* ==========================================================================
   Cards - the base container for all content
   ========================================================================== */

.ayudawp-acn-card {
    background: #fff;
    border: 1px solid #c3c4c7;
    padding: 24px;
    margin-bottom: 20px;
}

.ayudawp-acn-card h2 {
    margin: 0 0 4px;
    font-size: 1.3em;
    color: #1d2327;
}

.ayudawp-acn-card h3 {
    margin: 24px 0 8px;
    font-size: 1em;
    color: #1d2327;
}

.ayudawp-acn-card h3:first-child {
    margin-top: 0;
}

.ayudawp-acn-card-desc {
    margin: 0 0 20px;
    color: #646970;
}

/* ==========================================================================
   Form elements - radio and checkbox groups
   ========================================================================== */

.ayudawp-acn-radio-group,
.ayudawp-acn-checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 12px 0;
}

.ayudawp-acn-radio-label,
.ayudawp-acn-checkbox-label {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0 6px;
    padding: 10px 12px;
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.15s ease;
}

.ayudawp-acn-radio-label:hover,
.ayudawp-acn-checkbox-label:hover {
    border-color: #2271b1;
}

.ayudawp-acn-radio-label input[type="radio"],
.ayudawp-acn-checkbox-label input[type="checkbox"] {
    margin: 0 4px 0 0;
    flex-shrink: 0;
}

.ayudawp-acn-radio-label .description,
.ayudawp-acn-checkbox-label .description {
    flex-basis: 100%;
    margin: 4px 0 0 24px;
    color: #646970;
    font-size: 13px;
}

/* ==========================================================================
   Field rows (text inputs)
   ========================================================================== */

.ayudawp-acn-field-row {
    margin: 12px 0;
}

.ayudawp-acn-field-row input.regular-text {
    width: 100%;
    max-width: 500px;
}

.ayudawp-acn-field-row .description {
    margin-top: 6px;
}

/* ==========================================================================
   Warning text - simple inline notice, not a colored box
   ========================================================================== */

.ayudawp-acn-warning {
    padding: 10px 0;
    margin: 12px 0;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
}

.ayudawp-acn-warning strong {
    color: #1d2327;
}

/* ==========================================================================
   Confirmation checkbox
   ========================================================================== */

.ayudawp-acn-confirm-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 12px 16px;
    margin: 20px 0;
}

.ayudawp-acn-confirm-box label {
    cursor: pointer;
}

/* Red asterisk for required/warning indicators */
.ayudawp-acn-wrap .required {
    color: #d63638;
    font-weight: 700;
}

/* ==========================================================================
   Action buttons area
   ========================================================================== */

.ayudawp-acn-actions {
    margin-top: 20px;
}

.ayudawp-acn-actions .button + .button {
    margin-left: 10px;
}

.ayudawp-acn-actions .description {
    margin-top: 8px;
}

/* ==========================================================================
   Summary box (used in preview and batch mode)
   ========================================================================== */

.ayudawp-acn-summary-box {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
}

.ayudawp-acn-summary-list {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
}

.ayudawp-acn-summary-list ul {
    margin: 6px 0 0 18px;
    list-style: disc;
}

.ayudawp-acn-summary-list ul li {
    margin-bottom: 4px;
}

.ayudawp-acn-summary-exclusions {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #dcdcde;
}

.ayudawp-acn-summary-exclusions span {
    margin-left: 6px;
    color: #646970;
}

/* ==========================================================================
   Preview list - shows old -> new values
   ========================================================================== */

.ayudawp-acn-preview-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 12px;
    background: #f6f7f7;
}

.ayudawp-acn-preview-item {
    background: #fff;
    padding: 12px 16px;
    margin-bottom: 8px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
}

.ayudawp-acn-preview-item:last-child {
    margin-bottom: 0;
}

.ayudawp-acn-preview-header {
    font-weight: 600;
    margin-bottom: 8px;
    color: #1d2327;
    font-size: 13px;
}

.ayudawp-acn-change-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0;
    padding: 6px 10px;
    background: #f6f7f7;
    border-radius: 3px;
    font-size: 13px;
}

.ayudawp-acn-field-label {
    font-weight: 600;
    min-width: 120px;
    color: #50575e;
}

.ayudawp-acn-old-value {
    color: #b32d2e;
    text-decoration: line-through;
}

.ayudawp-acn-arrow {
    color: #50575e;
}

.ayudawp-acn-new-value {
    color: #007017;
    font-weight: 600;
}

/* ==========================================================================
   Results detail
   ========================================================================== */

.ayudawp-acn-results-detail {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 16px;
    margin: 16px 0;
}

.ayudawp-acn-results-detail h4 {
    margin: 0 0 10px;
    font-size: 1em;
}

.ayudawp-acn-results-detail ul {
    margin: 0;
    list-style: none;
}

.ayudawp-acn-results-detail ul li {
    padding: 8px 0;
    border-bottom: 1px solid #dcdcde;
}

.ayudawp-acn-results-detail ul li:last-child {
    border-bottom: none;
}

/* ==========================================================================
   Progress modal (batch processing)
   ========================================================================== */

.ayudawp-acn-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ayudawp-acn-modal {
    background: #fff;
    padding: 30px;
    border-radius: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.ayudawp-acn-modal h3 {
    margin-top: 0;
    color: #1d2327;
}

.ayudawp-acn-modal p {
    margin: 15px 0;
    color: #50575e;
}

.ayudawp-acn-required {
    color: #d63638;
    font-weight: 700;
}

.ayudawp-acn-progress-bar {
    width: 100%;
    height: 20px;
    background: #f0f0f0;
    border-radius: 0;
    overflow: hidden;
    border: 1px solid #dcdcde;
    margin: 20px 0 10px;
}

.ayudawp-acn-progress-fill {
    height: 100%;
    background: #50575e;
    width: 0;
    transition: width 0.3s ease;
}

.ayudawp-acn-progress-text {
    font-size: 14px;
    color: #50575e;
    text-align: center;
}

.ayudawp-acn-modal-actions {
    text-align: right;
    margin-top: 20px;
}

/* ==========================================================================
   Promotional banner
   ========================================================================== */

.ayudawp-acn-promo-notice {
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    padding: 20px;
    margin-top: 10px;
}

.ayudawp-acn-promo-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.ayudawp-acn-promo-column {
    background: #fff;
    border: 1px solid #dcdcde;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.ayudawp-acn-promo-column > .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #2271b1;
    margin-bottom: 12px;
}

.ayudawp-acn-promo-column h5 {
    margin: 0 0 10px;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.4;
}

.ayudawp-acn-promo-column p {
    margin: 0 0 15px;
    color: #50575e;
    font-size: 13px;
    line-height: 1.5;
    flex-grow: 1;
}

.ayudawp-acn-promo-column .button {
    align-self: flex-start;
    white-space: normal;
    height: auto;
    line-height: 1.4;
    padding: 6px 12px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media screen and (max-width: 1200px) {
    .ayudawp-acn-promo-columns {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 1024px) {
    .ayudawp-acn-row {
        flex-direction: column;
    }

    .ayudawp-acn-change-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .ayudawp-acn-field-label {
        min-width: auto;
    }
}

@media screen and (max-width: 782px) {
    .ayudawp-acn-promo-columns {
        grid-template-columns: 1fr;
    }
}

/* Per-field address selection */
.ayudawp-acn-address-block {
    margin-bottom: 6px;
}

.ayudawp-acn-address-fields {
    margin: 4px 0 10px 28px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 18px;
}

.ayudawp-acn-address-fields .ayudawp-acn-field-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    font-size: 13px;
    white-space: nowrap;
}

.ayudawp-acn-address-fields .ayudawp-acn-field-item input[type="checkbox"] {
    margin: 0;
}

.ayudawp-acn-address-fields .ayudawp-acn-field-item em {
    color: #646970;
    font-style: normal;
    font-size: 11px;
}

.ayudawp-acn-address-fields .ayudawp-acn-fields-hint {
    flex-basis: 100%;
    margin: 0;
}