/* Simple UTM Builder Admin Styles */

:root {
    --sutm-primary-color: rgb(221, 74, 31);
    --sutm-card-background: #fff;
    --sutm-card-border: #ccd0d4;
    --sutm-card-shadow: 0 1px 1px rgba(0,0,0,.04);
    --sutm-text-color: #3c434a;
    --sutm-heading-color: #1d2327;
}

/* Main Container - Constrained Width */
.sutm-container {
    max-width: 1000px;
}

/* Two-Column Layout */
.sutm-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
}

.sutm-column {
    margin-bottom: 20px;
}

.sutm-column-left {
    flex: 0 0 100%;
}

.sutm-column-right {
    flex: 0 0 100%;
}

@media (min-width: 782px) {
    .sutm-column-left {
        flex: 0 0 calc(60% - 10px);
    }

    .sutm-column-right {
        flex: 0 0 calc(40% - 10px);
    }
}


/* Card Styling (inspired by DB Reset Pro) */
.sutm-card {
    background-color: var(--sutm-card-background);
    border: 1px solid var(--sutm-card-border);
    box-shadow: var(--sutm-card-shadow);
    margin-bottom: 20px;
    padding: 20px;
}

.sutm-card h2, .sutm-card h3 {
    color: var(--sutm-heading-color);
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 1.3em;
}

.sutm-sidebar-card p {
    color: var(--sutm-text-color);
    line-height: 1.6;
}

/* Intro Section (adjusting to match card style somewhat) */
.sutm-intro-section {
    background-color: var(--sutm-card-background);
    border: 1px solid var(--sutm-card-border);
    border-left: 4px solid var(--sutm-primary-color);
    padding: 15px 20px;
    margin-bottom: 20px;
    box-shadow: var(--sutm-card-shadow);
}

.sutm-intro-section p {
    font-size: 14px;
    color: var(--sutm-text-color);
    margin: 0;
}

/* Tooltips */
.sutm-tooltip {
    display: inline-block;
    margin-left: 5px;
    cursor: help;
    border: 1px solid #ccc;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    color: #777;
    background-color: #f0f0f0;
    font-weight: bold;
    box-shadow: 0 1px 1px rgba(0,0,0,0.1);
    position: relative;
}

.sutm-tooltip:hover {
    background-color: #e0e0e0;
    border-color: #999;
}

/* Tooltip text display */
.sutm-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 125%;
    padding: 5px 8px;
    background-color: #333;
    color: #fff;
    font-size: 11px;
    font-weight: normal;
    border-radius: 3px;
    white-space: nowrap;
    z-index: 10000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

/* Optional: Tooltip arrow */
.sutm-tooltip:hover::before {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 100%;
    border-width: 5px;
    border-style: solid;
    border-color: #333 transparent transparent transparent;
    z-index: 10001;
}

/* Feedback Span for Generate Button */
#sutm-generate-feedback {
    font-style: italic;
}

/* Buttons */
.sutm-primary-button {
    background-color: var(--sutm-primary-color) !important;
    border-color: var(--sutm-primary-color) !important;
    color: #fff !important;
    text-shadow: none !important;
    box-shadow: none !important;
}

.sutm-primary-button:hover, .sutm-primary-button:focus {
    background-color: rgb(190, 60, 20) !important;
    border-color: rgb(190, 60, 20) !important;
    color: #fff !important;
}

.sutm-secondary-button {
    background-color: #f0f0f1;
    border: 1px solid var(--sutm-primary-color) !important;
    color: var(--sutm-primary-color) !important;
    text-decoration: none;
}

.sutm-secondary-button:hover, .sutm-secondary-button:focus {
    background-color: #e0e0e1;
    border-color: rgb(190, 60, 20) !important;
    color: rgb(190, 60, 20) !important;
}

/* Generated URL Section */
#sutm-generated-url-section h3 {
    margin-top: 0;
    margin-bottom: 5px;
}

.sutm-highlight-border {
    border: 2px solid var(--sutm-primary-color) !important;
    transition: border-color 0.3s ease-in-out;
}

#sutm-generated-url {
    width: 100%;
    padding: 8px;
    font-family: monospace;
    background-color: #fff;
    border: 1px solid #ddd;
    box-shadow: inset 0 1px 2px rgba(0,0,0,.07);
    margin-bottom: 10px;
}

/* Link History Section */
#sutm-link-history {
    margin-top: 30px;
    padding: 20px;
    background-color: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
}
#sutm-link-history h2 {
    margin-top: 0;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

#sutm-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

#sutm-history-list li {
    margin-bottom: 10px;
    padding: 15px;
    border: 1px solid #eee;
    background-color: #f9f9f9;
    border-radius: 3px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
}

#sutm-history-list li .sutm-history-details {
    flex-basis: 80%;
}

#sutm-history-list li .sutm-history-url {
    font-weight: bold;
    display: block;
    margin-bottom: 5px;
    word-break: break-all;
}

#sutm-history-list li .sutm-history-meta {
    font-size: 0.9em;
    color: #555;
    display: block;
    margin-bottom: 5px;
}

#sutm-history-list li .sutm-copy-history-link {
    flex-basis: auto;
    margin-left: auto;
    border: 1px solid var(--sutm-primary-color);
    color: var(--sutm-primary-color);
}

#sutm-history-list li .sutm-copy-history-link:hover,
#sutm-history-list li .sutm-copy-history-link:focus {
    border-color: rgb(190, 60, 20);
    color: rgb(190, 60, 20);
    background-color: #f0f0f1;
}

.sutm-no-history {
    color: #777;
    font-style: italic;
    padding: 10px;
    text-align: center;
}

/* Ensure required field indicators are visible if theme doesn't handle it */
.form-table th label + .sutm-tooltip + sup {
    color: red;
    font-weight: bold;
    margin-left: 2px;
}

/* WordPress Admin Notices styling adjustments if needed */
.sutm-wrap .notice {
    margin-left: 0;
    margin-right: 0;
}

/* Ensure extra up/down move arrows in meta box header are hidden, leaving only the collapse toggle */
/* #sutm_recent_links_box .handle-order-higher,
#sutm_recent_links_box .handle-order-lower {
    display: none !important;
} */

#sutm_recent_links_box .hndle {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

/* OnePageGA Promotion Styles */
.sutm-promo-box {
    background-color: #f0f6ff;
    border: 1px solid #b3d9ff;
    border-left: 4px solid var(--sutm-primary-color);
    padding: 15px;
    margin: 15px 0;
    border-radius: 3px;
}

.sutm-promo-box h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: var(--sutm-primary-color);
    font-size: 1.2em;
    border-bottom: none;
    padding-bottom: 0;
}

.sutm-features-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
}

.sutm-features-list li {
    padding: 3px 0;
    font-size: 13px;
    color: var(--sutm-text-color);
}

.sutm-promo-note {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 15px;
    text-align: center;
}

/* Responsive adjustments for small screens */
@media (max-width: 782px) {
    .sutm-layout {
        flex-direction: column;
    }

    .sutm-column-left,
    .sutm-column-right {
        flex: 0 0 100%;
    }
}