/* Admin Styles for WP Affiliate Notice Pro */

.affnotice-notice-box {
    display: flex;
    /* Flex for icon alignment */
    align-items: center;
    /* Center horizontally instead of top vertical */
    /* Align icon to top of text */
    gap: 15px;
    /* Space between icon and text */
    width: 100%;
    max-width: 600px;
    padding: 15px 20px;
    margin-bottom: 25px;
    border-radius: 8px;
    /* Soft corners */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    font-family: inherit;
    font-size: 16px;
    line-height: 1.5;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    box-sizing: border-box;
}

/* Content Wrapper - ensure it takes space */
.affnotice-notice-box>*:not(.affnotice-dismiss-btn) {
    flex-grow: 1;
}

/* Dismiss Button - Minimal Circle */
.affnotice-dismiss-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
    font-size: 14px;
    color: #72777c;
    transition: all 0.2s ease;
    opacity: 0.7;
}

.affnotice-dismiss-btn:hover {
    background: #ffffff !important;
    color: #444;
    opacity: 1;
}

.affnotice-dismiss-btn:active,
.affnotice-dismiss-btn:focus {
    background: #ffffff !important;
    color: #222;
    outline: none;
}

/* Ensure color picker aligns well */
.wp-picker-container {
    display: inline-block;
    vertical-align: middle;
}

#affnotice_live_preview_wrapper {
    margin-top: 20px;
    padding: 10px;
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

/* Category Checklist Styles */
.affnotice-category-checklist {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ddd;
    padding: 10px;
    background: #fff;
    border-radius: 4px;
}

.affnotice-category-checklist label {
    display: block;
    margin-bottom: 5px;
}

.affnotice-category-checklist label:last-child {
    margin-bottom: 0;
}

/* Checkmark Correction */
.affnotice-checkmark {
    margin-right: 15px !important;
    flex-shrink: 0 !important;
    width: 24px !important;
    height: 24px !important;
}

/* Content Rules */
.affnotice-content {
    line-height: inherit;
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

/* Utilities equivalent to frontend for preview consistency */
.affnotice-text-light {
    color: #ffffff;
}

.affnotice-text-light a {
    color: #ffffff;
    text-decoration: underline;
}

.affnotice-text-dark {
    color: #222222;
}

.affnotice-text-dark a {
    color: #000000;
    text-decoration: underline;
}

/* Robust Minimal Preview Style */
/* Robust Minimal Preview Style */
.affnotice-preview-minimal {
    background: #ffffff !important;
    background-image: none !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #ddd;
    /* Removed !important to allow JS override */
    border-left-width: 5px !important;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    /* Ensure visibility */
    /* Border color will be set dynamically via JS */
}

.affnotice-preview-minimal .affnotice-content,
.affnotice-preview-minimal p,
.affnotice-preview-minimal span {
    color: #333333 !important;
}

/* Ajax Loading Spinner */
.affnotice-loading-spinner {
    display: none;
    margin-left: 10px;
    vertical-align: middle;
}

.affnotice-save-success {
    color: #46b450;
    margin-left: 10px;
    font-weight: bold;
    display: none;
}

.affnotice-save-error {
    color: #dc3232;
    margin-left: 10px;
    font-weight: bold;
    display: none;
}

/* Checkmark margins fix */
.affnotice-content p {
    margin: 0 !important;
    padding: 0 !important;
}