/* New Dropdown Menu Styles */
.aysa-dropdown-menu {
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    min-width: 200px;
    max-width: 280px;
    overflow: visible;
    z-index: 9999;
}

.dropdown-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dropdown-item {
    margin: 0;
    padding: 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item button,
.dropdown-category-button {
    background: transparent;
    border: none;
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 15px;
    font-size: 13px;
    cursor: pointer;
    color: #444;
    transition: background-color 0.2s ease;
}

.dropdown-item button:hover,
.dropdown-category-button:hover {
    background-color: #f8f8f8;
    color: #0073aa;
}

.dropdown-submenu .dropdown-submenu-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-submenu-header {
    display: none;
}

.dropdown-back-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    color: #0073aa;
    padding: 0;
    font-size: 13px;
}

.dropdown-submenu-items {
    margin: 0;
    padding: 0;
    list-style: none;
    max-height: 300px;
    overflow-y: auto;
}

.dropdown-loading,
.dropdown-error,
.dropdown-no-items {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.dropdown-error {
    color: #d63638;
}

/* Make sure the submenu is visible when needed */
.dropdown-submenu-container {
    display: none;
}

.dropdown-submenu-container.visible {
    display: block;
}

/* Adding dashicons */
.dashicons-arrow-right-alt2 {
    font-family: dashicons;
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: inline-block;
}

.dashicons-arrow-left-alt2 {
    font-family: dashicons;
    font-size: 16px;
    width: 16px;
    height: 16px;
    display: inline-block;
}

/* Notification Styles */
.aysa-notification {
    padding: 15px 20px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    font-size: 14px;
    line-height: 1.4;
    max-width: 400px;
    width: 100%;
    position: relative;
    border-left: 4px solid #0073aa;
}

.aysa-notification-success {
    border-left-color: #46b450;
}

.aysa-notification-error {
    border-left-color: #d63638;
}

.aysa-notification-loading {
    border-left-color: #0073aa;
}

.aysa-notification .dashicons {
    margin-right: 10px;
    font-size: 20px;
    width: 20px;
    height: 20px;
}

.aysa-notification .dashicons-yes {
    color: #46b450;
}

.aysa-notification .dashicons-no {
    color: #d63638;
}

.aysa-notification .dashicons-info {
    color: #0073aa;
}

.dashicons-update.spinning {
    animation: spin 2s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.close-notification {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: none;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #aaa;
    transition: color 0.2s ease;
}

.close-notification:hover {
    color: #666;
}

.dropdown-submenu-container {
    background-color: #fff;
    position: absolute;
    width: 220px;
    min-width: 200px;
    z-index: 9999;
    border-radius: 4px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    left: -230px;
    top: 0;
}

.aysa-metabox-row {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.aysa-metabox-field {
    flex: 1;
    margin-right: 10px;
}

.aysa-metabox-field:last-child {
    margin-right: 0;
}

.aysa-metabox-label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #555;
    font-size: 13px;
}

.aysa-metabox-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.aysa-metabox-button-container {
    display: flex;
    align-items: flex-end;
    margin-left: 10px;
}

.aysa-metabox-button {
    padding: 8px 15px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    white-space: nowrap;
    height: 35px;
}

.aysa-metabox-button:hover {
    background-color: #3367d6;
}

.aysa-metabox {
    padding: 15px;
    background: #fff;
    box-sizing: border-box;
}

.aysa-metabox-section {
    margin-bottom: 25px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.aysa-metabox-section:last-child {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
}

.aysa-metabox-title {
    font-size: 15px;
    margin: 0 0 15px 0;
    color: #23282d;
    font-weight: 600;
}

/* Meta Description Styles */
.aysa-meta-description-field {
    margin-bottom: 15px;
}

.aysa-meta-description-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
    font-size: 13px;
}

.aysa-meta-description-field textarea {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 8px;
    font-size: 13px;
}

.aysa-meta-description-count {
    text-align: right;
    color: #666;
    font-size: 12px;
    margin: 5px 0 0;
}

.aysa-count-warning {
    color: #ca4a1f;
    font-weight: bold;
}

/* SERP Preview */
.aysa-serp-preview {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 15px;
    font-family: Arial, sans-serif;
}

.aysa-serp-title {
    color: #1a0dab;
    font-size: 18px;
    margin-bottom: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aysa-serp-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 5px;
}

.aysa-serp-description {
    color: #545454;
    font-size: 13px;
    line-height: 1.4;
}

/* Keyword Analysis */
.aysa-keyword-analysis {
    margin-top: 20px;
}

.aysa-keyword-stats {
    display: flex;
    flex-wrap: wrap;
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.aysa-stat-item {
    display: flex;
    align-items: center;
    margin-right: 20px;
    margin-bottom: 5px;
}

.aysa-stat-label {
    color: #666;
    font-size: 12px;
    margin-right: 5px;
}

.aysa-stat-value {
    font-weight: bold;
    color: #23282d;
    font-size: 13px;
}

/* Content Analysis */
.aysa-content-analysis {
    background: #f9f9f9;
    border: 1px solid #eee;
    border-radius: 4px;
    padding: 10px;
}

.aysa-analysis-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.aysa-analysis-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.aysa-analysis-item .dashicons {
    margin-right: 10px;
    margin-top: 2px;
}

.aysa-analysis-text {
    font-size: 13px;
    line-height: 1.4;
}

.aysa-good .dashicons {
    color: #46b450;
}

.aysa-bad .dashicons {
    color: #dc3232;
}

.aysa-warning .dashicons {
    color: #ffb900;
}

/* SEO Score */
.aysa-seo-score {
    display: flex;
    align-items: center;
}

.aysa-score-circle {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 20px;
    position: relative;
    border: 5px solid #ddd;
}

.aysa-score-circle[data-score="100"],
.aysa-score-circle[data-score="90"],
.aysa-score-circle[data-score="80"] {
    border-color: #46b450;
}

.aysa-score-circle[data-score="70"],
.aysa-score-circle[data-score="60"] {
    border-color: #ffb900;
}

.aysa-score-circle[data-score="50"],
.aysa-score-circle[data-score="40"],
.aysa-score-circle[data-score="30"],
.aysa-score-circle[data-score="20"],
.aysa-score-circle[data-score="10"],
.aysa-score-circle[data-score="0"] {
    border-color: #dc3232;
}

.aysa-score-number {
    font-size: 24px;
    font-weight: bold;
    color: #23282d;
}

.aysa-score-text {
    flex: 1;
}

.aysa-score-text p {
    margin: 0 0 5px 0;
    font-size: 13px;
    line-height: 1.4;
}

.aysa-score-message {
    font-style: italic;
    color: #666;
}

.aysa-keyword-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.aysa-keyword-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.aysa-keyword-label {
    font-weight: 500;
    color: #555;
    font-size: 13px;
    white-space: nowrap;
    min-width: 70px;
}

.aysa-keyword-input {
    width: 200px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    height: 35px;
}

.aysa-keyword-button {
    padding: 8px 15px;
    background-color: #008296;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    height: 35px;
    white-space: nowrap;
}

.aysa-keyword-button:hover {
    background-color: #006d7e;
}

/* Refresh Data Button Styles - blue theme */
.aysa-refresh-data-btn {
    padding: 8px 16px;
    background: #1a73e8;
    border: 1px solid #1a73e8;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
    color: white;
    text-decoration: none;
    white-space: nowrap;
}

.aysa-refresh-data-btn:hover {
    background-color: #1557b0;
    border-color: #1557b0;
    color: white;
}

.aysa-refresh-data-btn:active {
    background-color: #1348a0;
    border-color: #1348a0;
}

.aysa-refresh-data-btn:disabled {
    background-color: #9aa0a6;
    color: #fff;
    cursor: not-allowed;
    opacity: 0.6;
    border-color: #9aa0a6;
}

.aysa-refresh-data-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    margin-top: 0;
}

.aysa-refresh-data-btn.loading {
    background-color: #9aa0a6;
    color: #fff;
    cursor: not-allowed;
    border-color: #9aa0a6;
}

.aysa-refresh-data-btn.loading .dashicons {
    animation: aysa-spin 1s linear infinite;
}

@keyframes aysa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkbox style */
.aysa-keyword-checkbox {
    margin-top: 15px;
    display: flex;
    align-items: center;
}

.aysa-keyword-checkbox input[type="checkbox"] {
    margin-right: 8px;
}

.aysa-edit-snippet-button {
    background-color: #00b0d7;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 15px;
    font-size: 13px;
    cursor: pointer;
    margin-top: 10px;
}

.aysa-edit-snippet-button:hover {
    background-color: #008db1;
}

.aysa-preview-link,
.aysa-preview-title,
.aysa-preview-description {
    margin: 5px 0;
    font-size: 13px;
}

.aysa-preview-link {
    color: #006621;
}

.aysa-preview-title {
    color: #1a0dab;
    font-size: 16px;
    font-weight: normal;
}

.aysa-tooltip {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #ccc;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 11px;
    font-style: italic;
    margin-left: 5px;
    cursor: help;
}

.keyword-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 20px;
}

.keyword-column {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    flex-direction: column;
}

.keyword-button {
    display: flex;
    align-items: flex-end;
    margin-top: 25px; /* Align with inputs */
}

/* Bar container adjustments */
.bar-container {
    margin-top: 5px;
    max-width: 80%; /* Reduce the width of the bar */
    width: 80%;
}

/* Limit the width of the progress bar container */
.progress-container {
    max-width: 80%; /* Reduce the width of the progress container */
    width: 80%;
}

.progress-container.no-padding {
    width: 80%; /* Reduce the width of no-padding progress container */
    position: relative;
}

/* Ensure the progress bar doesn't get too wide */
.progress-bar {
    max-width: 80%; /* Ensure progress bar is limited in width */
    height: 5px !important;
}

/* Percentage position adjustment */
.percentage {
    position: absolute;
    right: 0;
    top: 0;
    background: transparent !important;
    font-size: 12px;
}

/* Layout fixes for labels above inputs */
.keyword-column .label-container, 
.keyword-column > label {
    margin-bottom: 5px;
    display: block;
}

/* Fix for keyword input to accommodate the percentage */
.keyword-column input[type="text"] {
    width: 100%;
    position: relative;
    padding-right: 40px; /* Make room for percentage */
}

/* Existing style override */
.sub-group {
    margin-bottom: 20px;
}

/* Layout fixes for the tabs and Get SEO button */
.inner-box.tab-container {
    flex-direction: column;
    align-items: flex-start;
}

.inner-box.tab-container .tabs {
    width: 100%;
    margin-bottom: 10px;
}

.inner-box.tab-container .btn.btn-universal.get-seo {
    margin-top: 5px;
    margin-bottom: 15px;
}

/* Styles for meta title, meta description, meta keywords */
.meta-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
}

.meta-column {
    flex: 1;
    min-width: 0;
    position: relative;
}

.meta-button {
    display: flex;
    align-items: flex-end;
    margin-top: 25px;
}

/* Notification Modal Styles */
.aysa-notification-modal-content {
    max-width: 180px;
    margin: 10% auto;
}

.aysa-notification-message {
    display: flex;
    align-items: center;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 8px;
}

.aysa-notification-message.success {
    background-color: rgba(76, 175, 80, 0.1);
    border-left: 4px solid #4CAF50;
}

.aysa-notification-message.error {
    background-color: rgba(244, 67, 54, 0.1);
    border-left: 4px solid #F44336;
}

.aysa-notification-message i {
    font-size: 16px;
    margin-right: 8px;
}

.aysa-notification-message i.aysa-icon-success:before {
    content: '✓';
    color: #4CAF50;
}

.aysa-notification-message i.aysa-icon-error:before {
    content: '✕';
    color: #F44336;
}

.aysa-notification-message p {
    margin: 0;
    font-size: 12px;
}

/* Make the modal header and footer smaller */
#aysa-notification-modal .aysa-modal-header {
    padding: 10px;
}

#aysa-notification-modal .aysa-modal-footer {
    padding: 10px;
}

#aysa-notification-modal .aysa-modal-title {
    font-size: 14px;
    margin: 0;
}

#aysa-notification-modal .aysa-modal-body {
    padding: 10px;
}

#aysa-notification-modal .aysa-btn {
    padding: 5px 10px;
    font-size: 12px;
}

/* Navigation Button Styles */
.aysa-navigate-to-page {
    margin-left: 5px;
    background-color: #0073aa !important;
    color: white !important;
    border: none !important;
}

.aysa-navigate-to-page:hover {
    background-color: #005a87 !important;
}

/* Ensure buttons in the table fit well */
.aysa-btn {
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    border-radius: 3px;
    margin-bottom: 5px;
}

/* Make sure the table cell with buttons has enough space */
#aysa-associations-table td:last-child {
    min-width: 180px;
    white-space: nowrap;
}

.aysa-loading-cell {
    text-align: center;
    padding: 20px;
    color: #555;
    font-style: italic;
    background-color: #f9f9f9;
}

.aysa-error-cell {
    text-align: center;
    padding: 20px;
    color: #d63638;
    background-color: rgba(214, 54, 56, 0.1);
    border-left: 4px solid #d63638;
}

/* Entity Link Styles */
.aysa-entity-cell {
    position: relative;
}

.aysa-entity-cell a {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.aysa-entity-cell a:hover {
    color: #135e96;
    text-decoration: underline;
}

.aysa-edit-link {
    margin-left: 8px;
    color: #666 !important;
    text-decoration: none !important;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.aysa-edit-link:hover {
    opacity: 1;
    color: #2271b1 !important;
}

.aysa-edit-link .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}

.aysa-loading {
    color: #666;
    font-style: italic;
    position: relative;
}

.aysa-loading::after {
    content: '';
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-left: 8px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    vertical-align: middle;
}

.aysa-error {
    color: #d63638;
    font-style: italic;
    font-size: 12px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Filters Section Styles */
.aysa-filters-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e2e4e7;
}

.aysa-filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.aysa-filter-input,
.aysa-filter-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    min-width: 200px;
}

.aysa-filter-input:focus,
.aysa-filter-select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 1px #2271b1;
    outline: none;
}

.aysa-filter-select {
    background-color: white;
    cursor: pointer;
}

#clear-filters {
    padding: 8px 16px;
    background-color: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#clear-filters:hover {
    background-color: #5a6268;
}

/* Custom Modal Styles */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

.custom-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.custom-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 10001;
    animation: slideInUp 0.3s ease-out;
}

.custom-modal-content {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.custom-modal-header {
    background: linear-gradient(135deg, #2271b1 0%, #1e5a8a 100%);
    color: white;
    padding: 24px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.custom-modal-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
}

.custom-modal-title i {
    font-size: 28px;
}

.custom-modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.custom-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.custom-modal-body {
    padding: 32px;
}

.form-section {
    margin-bottom: 32px;
}

.form-label {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
}

/* Platform Grid */
.platform-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 16px;
    margin-bottom: 8px;
}

.platform-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 16px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.platform-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.5s;
}

.platform-card:hover::before {
    left: 100%;
}

.platform-card:hover {
    border-color: #3b82f6;
    background: #eff6ff;
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(59, 130, 246, 0.15);
}

.platform-card.selected {
    border-color: #3b82f6;
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

.platform-card i {
    font-size: 32px;
    margin-bottom: 8px;
    transition: transform 0.3s ease;
}

.platform-card:hover i {
    transform: scale(1.1);
}

.platform-card span {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* Platform-specific colors */
.platform-card[data-platform="facebook"]:hover,
.platform-card[data-platform="facebook"].selected {
    border-color: #1877f2;
    background: #1877f2;
}

.platform-card[data-platform="linkedin"]:hover,
.platform-card[data-platform="linkedin"].selected {
    border-color: #0a66c2;
    background: #0a66c2;
}

.platform-card[data-platform="x"]:hover,
.platform-card[data-platform="x"].selected {
    border-color: #000000;
    background: #000000;
}

.platform-card[data-platform="instagram"]:hover,
.platform-card[data-platform="instagram"].selected {
    border-color: #e4405f;
    background: #e4405f;
}

.platform-card[data-platform="youtube"]:hover,
.platform-card[data-platform="youtube"].selected {
    border-color: #ff0000;
    background: #ff0000;
}

.platform-card[data-platform="pinterest"]:hover,
.platform-card[data-platform="pinterest"].selected {
    border-color: #bd081c;
    background: #bd081c;
}

/* Custom Textarea */
.custom-textarea {
    width: 100%;
    min-height: 150px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.custom-textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.custom-textarea::placeholder {
    color: #94a3b8;
    font-style: italic;
}

/* Character Info */
.character-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 12px;
    font-size: 14px;
}

.character-counter {
    color: #64748b;
    font-weight: 500;
}

.character-status {
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.character-status.warning {
    background: #fef3c7;
    color: #d97706;
}

.character-status.danger {
    background: #fee2e2;
    color: #dc2626;
}

.character-status.success {
    background: #d1fae5;
    color: #059669;
}

/* Custom Buttons */
.form-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.custom-btn {
    padding: 14px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.custom-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.custom-btn:active::before {
    width: 300px;
    height: 300px;
}

.custom-btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.custom-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.custom-btn-secondary {
    background: #f8fafc;
    color: #475569;
    border: 2px solid #e2e8f0;
}

.custom-btn-secondary:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateY(-1px);
}

.custom-btn-outline {
    background: transparent;
    color: #007cba;
    border: 2px solid #007cba;
    text-decoration: none;
}

.custom-btn-outline:hover {
    background: #007cba;
    color: white;
    text-decoration: none;
    transform: translateY(-1px);
}

.custom-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(60px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal Open Body Style */
body.modal-open {
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .custom-modal-container {
        width: 95%;
        margin: 20px;
    }
    
    .custom-modal-header {
        padding: 20px 24px;
    }
    
    .custom-modal-title {
        font-size: 20px;
    }
    
    .custom-modal-body {
        padding: 24px;
    }
    
    .platform-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 12px;
    }
    
    .platform-card {
        height: 80px;
        padding: 12px 8px;
    }
    
    .platform-card i {
        font-size: 24px;
    }
    
    .platform-card span {
        font-size: 12px;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .custom-btn {
        justify-content: center;
    }
}

/* Error Modal Styles */
.aysa-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.aysa-modal-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 500px;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.aysa-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.aysa-modal-header h3 {
    margin: 0;
    color: #333;
}

.aysa-modal-close {
    color: #aaa;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.aysa-modal-close:hover,
.aysa-modal-close:focus {
    color: #333;
    text-decoration: none;
    cursor: pointer;
}

.aysa-modal-body {
    color: #666;
    line-height: 1.5;
}

/* 301 Redirects Filter Styles */
.aysa-redirect-filters,
.aysa-404-filters,
.aysa-gone-filters {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.aysa-filter-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

.aysa-search-box {
    position: relative;
    flex: 1 !important;
    min-width: 200px !important;
}

.aysa-search-box input {
    width: 100% !important;
    padding: 8px 35px 8px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.aysa-search-box .dashicons {
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    color: #666 !important;
    font-size: 16px !important;
}

.aysa-filter-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    flex-shrink: 0 !important;
}

.aysa-filter-group label {
    font-weight: 500 !important;
    color: #333 !important;
    white-space: nowrap !important;
}

.aysa-filter-group select {
    padding: 6px 12px !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    font-size: 14px !important;
}

.aysa-filter-actions {
    display: flex !important;
    gap: 10px !important;
    flex-shrink: 0 !important;
}

.aysa-loading-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 20px;
}

.aysa-loading-text {
    color: #666;
    font-style: italic;
}

.aysa-spinning {
    animation: spin 1s linear infinite;
}

.aysa-empty-message {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

/* Force consistent layout for all filter sections */
.aysa-redirect-filters .aysa-filter-row,
.aysa-404-filters .aysa-filter-row,
.aysa-gone-filters .aysa-filter-row {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    flex-wrap: wrap !important;
}

/* Ensure search box takes up available space */
.aysa-redirect-filters .aysa-search-box,
.aysa-404-filters .aysa-search-box,
.aysa-gone-filters .aysa-search-box {
    flex: 1 !important;
    min-width: 200px !important;
}

/* Prevent filter group and actions from wrapping */
.aysa-redirect-filters .aysa-filter-group,
.aysa-404-filters .aysa-filter-group,
.aysa-gone-filters .aysa-filter-group,
.aysa-redirect-filters .aysa-filter-actions,
.aysa-404-filters .aysa-filter-actions,
.aysa-gone-filters .aysa-filter-actions {
    flex-shrink: 0 !important;
}

@media (max-width: 768px) {
    .aysa-filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .aysa-search-box {
        min-width: auto;
    }
    
    .aysa-filter-group {
        justify-content: space-between;
    }
    
    .aysa-filter-actions {
        justify-content: center;
    }
}

/* SEO Generation Modal Styles */
.aysa-modal-form-group {
    margin-bottom: 20px;
}

.aysa-modal-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.aysa-keyword-input-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.aysa-modal-input {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.aysa-modal-input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.aysa-modal-input[readonly] {
    background-color: #f9f9f9;
    color: #666;
}

.aysa-btn-small {
    padding: 6px 12px;
    font-size: 12px;
    min-height: auto;
}

.aysa-entity-type {
    display: inline-block;
    padding: 4px 8px;
    background-color: #f0f0f0;
    border-radius: 3px;
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.aysa-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Status badge styles for schedule table */
.aysa-status-pending {
    background-color: #f0ad4e;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

.aysa-status-applied {
    background-color: #5cb85c;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

/* SEO Preview Modal Styles */
.aysa-preview-section {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
}

.aysa-preview-section h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.aysa-preview-suggested {
    margin-top: 8px;
}

.aysa-preview-suggested strong {
    color: #0073aa;
    font-weight: 600;
}

.aysa-content-preview {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    white-space: pre-wrap;
}

/* SEO Generation Automation Styles */
.aysa-automation-section {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
}

.aysa-automation-section h3 {
    margin-top: 0;
    color: #23282d;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.aysa-automation-controls {
    margin: 15px 0;
}

.aysa-automation-controls .button {
    margin-right: 10px;
    margin-bottom: 10px;
}

.aysa-automation-status {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 15px;
    margin: 15px 0;
}

.aysa-status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.aysa-stat-item {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 3px;
    text-align: center;
}

.aysa-stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #0073aa;
    margin-bottom: 5px;
}

.aysa-stat-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
}

.aysa-status-item {
    background: #fff;
    padding: 10px;
    border: 1px solid #e1e1e1;
    border-radius: 3px;
}

.aysa-automation-form {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 3px;
    padding: 20px;
    margin: 15px 0;
}

.aysa-automation-form h4 {
    margin-top: 0;
    color: #23282d;
}

.aysa-automation-form .form-table th {
    width: 150px;
}

.aysa-automation-form input[type="text"],
.aysa-automation-form input[type="number"],
.aysa-automation-form select {
    width: 100%;
    max-width: 300px;
}

/* Timeout and Error Indicators */
.aysa-timeout-warning {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 10px;
    border-radius: 3px;
    margin: 10px 0;
}

.aysa-error-indicator {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 10px;
    border-radius: 3px;
    margin: 10px 0;
}

.aysa-success-indicator {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 10px;
    border-radius: 3px;
    margin: 10px 0;
}

/* Loading States */
.aysa-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.aysa-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #0073aa;
    border-radius: 50%;
    animation: aysa-spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes aysa-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Monitoring & Analytics - Full URL Display */
.aysa-entity-url.aysa-full-url {
    word-break: break-all;
    line-height: 1.3;
    max-width: none !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: initial !important;
    display: inline-block;
    color: #0073aa;
    text-decoration: none;
    font-size: 12px;
}

.aysa-entity-url.aysa-full-url:hover {
    color: #005a87;
    text-decoration: underline;
}

/* Ensure URL cell has proper width and wrapping */
.aysa-url-target-cell {
    max-width: 300px;
    min-width: 200px;
    word-wrap: break-word;
    vertical-align: top;
}

.aysa-entity-details {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 5px;
}

.aysa-entity-details .aysa-entity-separator {
    flex-shrink: 0;
}

/* On-Page Optimization: emphasize main keyword vs secondary list */
.aysa-entity-keywords .aysa-keyword-group {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
    flex-wrap: wrap;
}

.aysa-entity-keywords .aysa-keyword-title {
    margin-right: 2px;
    font-size: 11px;
    line-height: 1.25;
}

.aysa-entity-keywords .aysa-keyword-title-main {
    color: #0b3d91;
    font-weight: 700;
}

.aysa-entity-keywords .aysa-unlinked-chip-main {
    background: #eaf2ff;
    border: 1px solid #8ab4f8;
    color: #0b3d91;
    font-weight: 700;
}

.aysa-entity-keywords .aysa-keyword-title-secondary {
    color: #4b5563;
    font-weight: 600;
}

.aysa-entity-keywords .aysa-unlinked-chip-secondary {
    background: #f8fafc;
    border: 1px solid #d6dee8;
    color: #334155;
    font-weight: 500;
}
