/**
 * Password generator modal and inline trigger button styles.
 *
 * @package Woo_Otimizations
 */
/* Overlay */
.ow-passgen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 100000;
    display: none;
    backdrop-filter: blur(2px);
}

/* Modal */
.ow-passgen-modal {
    position: fixed;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 24px;
    max-width: 480px;
    width: 90%;
    z-index: 100001;
    display: none;
    box-shadow: 0 4px 24px rgba(0,0,0,0.15);
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    color: #1d2327;
}

/* Modal Header */
.ow-passgen-modal h3 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
    line-height: 1.3;
    border: none;
    padding: 0;
    background: transparent;
}

/* Data Box */
.ow-passgen-data {
    width: 100%;
    border: 1px solid #c3c4c7;
    background: #f6f7f7;
    padding: 16px;
    margin: 16px 0;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
    line-height: 1.5;
}

.ow-passgen-modal .ow-row {
    margin: 6px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: baseline;
    word-break: break-all;
}

.ow-passgen-modal .ow-row strong {
    font-weight: 600;
    min-width: 70px;
    color: #2c3338;
}

.ow-passgen-modal .ow-row a {
    color: #2271b1;
    text-decoration: underline;
}

/* Tip Text */
.ow-passgen-tip {
    margin-top: 12px;
    font-size: 13px;
    color: #646970;
    line-height: 1.4;
    font-style: italic;
}

/* Actions/Buttons */
.ow-passgen-modal .ow-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.ow-passgen-modal .ow-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border-radius: 4px;
    text-decoration: none;
    line-height: normal;
    transition: all 0.2s ease;
    height: auto;
}

/* Secondary Button (Close) */
.ow-passgen-modal .ow-actions button#owPassGenClose {
    background: #f0f0f1;
    border: 1px solid #8c8f94;
    color: #2c3338;
}
.ow-passgen-modal .ow-actions button#owPassGenClose:hover {
    background: #f6f7f7;
    border-color: #2c3338;
    color: #1d2327;
}

/* Primary Button (Copy) */
.ow-passgen-modal .ow-actions button#owPassGenCopy {
    background: #2271b1;
    border: 1px solid #2271b1;
    color: #fff;
}
.ow-passgen-modal .ow-actions button#owPassGenCopy:hover {
    background: #135e96;
    border-color: #135e96;
    color: #fff;
}

/* Success/Error States for Copy Button */
.ow-passgen-modal .ow-actions button#owPassGenCopy.success {
    background: #00a32a !important;
    border-color: #00a32a !important;
}
.ow-passgen-modal .ow-actions button#owPassGenCopy.error {
    background: #d63638 !important;
    border-color: #d63638 !important;
}

/* Inline Input Layout */
.ow-passgen-inline {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-bottom: 1em; /* Ensure spacing in block themes */
    width: 100%;
}

.ow-passgen-inline input[type="password"],
.ow-passgen-inline input[name="password"],
.ow-passgen-inline input[name="account_password"] {
    flex: 1;
    min-width: 0; /* Prevent flex overflow */
}

.ow-passgen-inline button#owPassGenBtn {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0 16px;
    height: auto; /* Match input height usually */
    min-height: 40px; /* Common input height */
    display: inline-flex;
    align-items: center;
}

/* Disabled state */
.ow-passgen-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    pointer-events: none;
}
