/* ContentBeast Auto Publisher - Admin Styles */

/* Override WordPress table structure */
body.settings_page_contentbeast-auto-publisher-lite .form-table th {
    display: none !important;
    width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
}

body.settings_page_contentbeast-auto-publisher-lite .form-table td {
    display: block !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
}

body.settings_page_contentbeast-auto-publisher-lite .form-table tbody,
body.settings_page_contentbeast-auto-publisher-lite .form-table tr {
    display: block !important;
    width: 100% !important;
}

body.settings_page_contentbeast-auto-publisher-lite .form-table {
    margin-top: 0 !important;
    border: none !important;
}

/* Modern Header Design */
.contentbeast-header {
    background: linear-gradient(135deg, #5bc592 0%, #3aa876 100%);
    border: none;
    padding: 40px;
    margin: 20px 0 30px 0;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(91, 197, 146, 0.25);
    position: relative;
    overflow: hidden;
}

.contentbeast-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="none"/><circle cx="50" cy="50" r="40" fill="rgba(255,255,255,0.05)"/></svg>');
    opacity: 0.1;
}

.contentbeast-header-content {
    display: flex;
    align-items: center;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.contentbeast-logo {
    width: 80px;
    height: 80px;
    flex-shrink: 0;
    background: white;
    border-radius: 16px;
    padding: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.contentbeast-header-text h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    font-weight: 700;
    color: #1d2327;
    text-shadow: none;
}

.contentbeast-header-text > p {
    margin: 0 0 20px 0;
    color: #2d3748;
    font-size: 16px;
    line-height: 1.6;
}

/* Setup Instructions in Header */
.contentbeast-header-text h3 {
    color: #1d2327;
    font-size: 18px;
    font-weight: 600;
    margin: 25px 0 12px 0;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.contentbeast-header-text ol {
    margin: 0;
    padding-left: 20px;
    color: #2d3748;
    font-size: 15px;
    line-height: 2;
}

.contentbeast-header-text ol strong {
    color: #1d2327;
    font-weight: 600;
}

.contentbeast-header-text a {
    color: #1d2327;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s;
    background: white;
    padding: 4px 12px;
    border-radius: 6px;
    display: inline-block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contentbeast-header-text a:hover {
    background: #f8f9fa;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none;
}

/* Form Field Styling */
body.settings_page_contentbeast-auto-publisher-lite .form-table td label[for] {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 15px;
    color: #1d2327;
}

body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="password"],
body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="text"],
body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="number"] {
    width: 100%;
    max-width: 600px;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.2s;
    background: white;
}

body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="password"]:focus,
body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="text"]:focus,
body.settings_page_contentbeast-auto-publisher-lite .form-table input[type="number"]:focus {
    border-color: #5bc592;
    outline: none;
    box-shadow: 0 0 0 3px rgba(91, 197, 146, 0.1);
}

/* Webhook URL Display */
body.settings_page_contentbeast-auto-publisher-lite code {
    display: block;
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    font-size: 13px;
    color: #495057;
    border: 2px solid #e9ecef;
    font-family: 'Monaco', 'Menlo', 'Consolas', monospace;
    word-break: break-all;
    max-width: 600px;
}

/* Description Text */
.description {
    color: #6c757d !important;
    font-size: 14px !important;
    margin-top: 8px !important;
}

/* Save Button */
body.settings_page_contentbeast-auto-publisher-lite .button-primary {
    background: linear-gradient(135deg, #5bc592 0%, #3aa876 100%) !important;
    border: none !important;
    color: white !important;
    padding: 14px 32px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.3s !important;
    box-shadow: 0 4px 15px rgba(91, 197, 146, 0.3) !important;
    text-shadow: none !important;
    height: auto !important;
}

body.settings_page_contentbeast-auto-publisher-lite .button-primary:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 20px rgba(91, 197, 146, 0.4) !important;
}

body.settings_page_contentbeast-auto-publisher-lite .button-primary:active {
    transform: translateY(0) !important;
}

/* Advanced Settings Accordion */
body.settings_page_contentbeast-auto-publisher-lite details {
    margin-top: 40px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 0;
    overflow: hidden;
}

body.settings_page_contentbeast-auto-publisher-lite details summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    padding: 20px 24px;
    color: #495057;
    background: #f8f9fa;
    transition: all 0.2s;
    user-select: none;
    list-style: none;
}

body.settings_page_contentbeast-auto-publisher-lite details summary::-webkit-details-marker {
    display: none;
}

body.settings_page_contentbeast-auto-publisher-lite details summary::before {
    content: '▶';
    display: inline-block;
    margin-right: 10px;
    transition: transform 0.2s;
}

body.settings_page_contentbeast-auto-publisher-lite details[open] summary::before {
    transform: rotate(90deg);
}

body.settings_page_contentbeast-auto-publisher-lite details summary:hover {
    background: #e9ecef;
}

body.settings_page_contentbeast-auto-publisher-lite details > div {
    padding: 24px;
}

body.settings_page_contentbeast-auto-publisher-lite details p:first-child {
    margin-top: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Checkboxes */
body.settings_page_contentbeast-auto-publisher-lite input[type="checkbox"] {
    margin-right: 8px;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 782px) {
    .contentbeast-header {
        padding: 30px 20px;
    }
    
    .contentbeast-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .contentbeast-logo {
        width: 60px;
        height: 60px;
    }
    
    .contentbeast-header-text h2 {
        font-size: 24px;
    }
}

.contentbeast-header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.contentbeast-logo {
    width: 60px;
    height: 60px;
    flex-shrink: 0;
}

.contentbeast-header-text h2 {
    margin: 0 0 8px 0;
    font-size: 22px;
    font-weight: 600;
    color: #1d2327;
}

.contentbeast-header-text p {
    margin: 0 0 10px 0;
    color: #50575e;
    font-size: 14px;
    line-height: 1.5;
}

.contentbeast-header-link {
    display: inline-block;
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
}

.contentbeast-header-link:hover {
    color: #135e96;
    text-decoration: underline;
}

.contentbeast-save-button {
    background: #2271b1 !important;
    border-color: #2271b1 !important;
    color: #fff !important;
    text-decoration: none;
    text-shadow: none;
    font-size: 16px !important;
    line-height: 1.5 !important;
    padding: 12px 24px !important;
    height: auto !important;
    border-radius: 4px;
    cursor: pointer;
    border-width: 1px;
    border-style: solid;
    font-weight: 600;
    display: inline-block;
    margin: 15px 0 !important;
}

.contentbeast-save-button:hover,
.contentbeast-save-button:focus {
    background: #135e96 !important;
    border-color: #135e96 !important;
    color: #fff !important;
}

.contentbeast-save-button:active {
    transform: translateY(1px);
}
