/* Notifications Card Styles */

/* Main card container for notifications, with flexible width, padding, and shadow */
.smartgen-card {
    background-color: var(--form-background);
    flex: 1 1 400px; /* Flexible width with minimum width constraint */
    padding: 0;
    border-radius: 10px;
    box-shadow: var(--box-shadow);
    min-width: 280px;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Header for the card with primary background and white text */
.card-header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 15px;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    position: relative;
}

/* Header title with no margin, small font size, and horizontal alignment */
.card-header h3 {
    margin: 0;
    font-size: 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Tooltip Styles */

/* Tooltip container positioned relative to parent */
.smartgen-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    cursor: pointer;
}

/* Tooltip icon with white color and fixed size */
.smartgen-tooltip .dashicons {
    font-size: 16px;
    color: #fff;
}

/* Tooltip text with hidden visibility, centered, background color, and transition effect */
.smartgen-tooltip .tooltip-text {
    visibility: hidden;
    width: max-content;
    background-color: rgba(0, 0, 0, 0.8);
    color: #fff;
    text-align: center;
    padding: 8px 12px;
    border-radius: 6px;
    position: absolute;
    z-index: 9999;
    bottom: 125%; /* Positions tooltip above icon */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

/* Tooltip arrow pointing downwards from the tooltip box */
.smartgen-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%; /* Positions arrow below tooltip */
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.8) transparent transparent transparent;
}

/* Display tooltip text on hover */
.smartgen-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Card Content */

/* Content section within the card with padding and auto-scroll if content overflows */
.card-content {
    padding: 20px;
    flex-grow: 1;
    overflow-y: auto;
}

/* Notifications List */

/* Container for notifications list with no default styling */
.smartgen-notifications {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Single notification styling with padding, spacing, and animation */
.smartgen-notification {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 14px;
    position: relative;
    animation: fadeIn 0.5s;
}

/* Success notification background and text color */
.smartgen-notification.success {
    background-color: #e0f7ec;
    color: #2e7d32;
}

/* Error notification background and text color */
.smartgen-notification.error {
    background-color: #ffebee;
    color: #c62828;
}

/* Warning notification background and text color */
.smartgen-notification.warning {
    background-color: #fff3e0;
    color: #ef6c00;
}

/* Info notification background and text color */
.smartgen-notification.info {
    background-color: #e3f2fd;
    color: #0277bd;
}

/* Icon within each notification */
.smartgen-notification .dashicons {
    font-size: 20px;
}

/* Dismiss button positioned at the top right corner of the notification */
.dismiss-notification {
    position: absolute;
    top: 8px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: inherit;
}

.dismiss-notification:hover {
    color: var(--secondary-color);
}

/* Average API Response Time */

/* Container for displaying average API response time with border and padding */
.smartgen-api-response-time {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9fafb;
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

/* Heading styling for the response time section */
.smartgen-api-response-time h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

/* Text content for response time details */
.smartgen-api-response-time p {
    margin: 0;
    font-size: 14px;
    color: var(--text-color);
}

/* Latest API Error */

/* Container for the latest API error section with distinct background and border color */
.smartgen-latest-api-error {
    margin-top: 20px;
    padding: 10px;
    background-color: #fff3e0;
    border-left: 4px solid #ef6c00;
    border-radius: 5px;
}

.smartgen-latest-api-error h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

.smartgen-latest-api-error p {
    margin: 0 0 5px 0;
    font-size: 14px;
    color: var(--text-color);
}

/* Collapsible error details with reduced font size */
.smartgen-latest-api-error details {
    margin-top: 5px;
    font-size: 13px;
}

/* Plugin Information */

/* Container for plugin information with blue-themed border and background */
.smartgen-plugin-info {
    margin-top: 20px;
    padding: 10px;
    background-color: #e3f2fd;
    border-left: 4px solid #0277bd;
    border-radius: 5px;
}

.smartgen-plugin-info h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: var(--text-color);
}

.smartgen-plugin-info p {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: var(--text-color);
}

/* Changelog styling with smaller font */
.smartgen-changelog {
    font-size: 13px;
    color: var(--text-color);
}

/* Feature Request Form */

/* Container for feature request form with neutral background and left border */
.smartgen-feature-request {
    margin-top: 20px;
    padding: 10px;
    background-color: #f9fafb;
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

/* Heading for feature request section */
.smartgen-feature-request h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: var(--text-color);
}

/* Form group with margin for spacing */
.smartgen-feature-request .form-group {
    margin-bottom: 15px;
}

/* Label styling for form inputs */
.smartgen-feature-request label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    color: var(--text-color);
}

/* Input field styles for text, select, and textarea with border and padding */
.smartgen-feature-request input[type="text"],
.smartgen-feature-request select,
.smartgen-feature-request textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: var(--input-border-radius);
    font-family: var(--font-family);
    font-size: 14px;
    box-sizing: border-box;
}

.smartgen-feature-request textarea {
    resize: vertical;
}

/* Submit button with primary color, rounded edges, and hover effect */
.smartgen-feature-request button {
    padding: 10px 15px;
    background-color: var(--primary-color);
    border: none;
    border-radius: var(--input-border-radius);
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: background-color var(--transition-duration), box-shadow var(--transition-duration);
}

.smartgen-feature-request button:hover {
    background-color: var(--button-hover-color);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.1);
}

/* Changelog Styling */

/* Indented list for changelog items */
.smartgen-changelog ul {
    padding-left: 20px;
}

.smartgen-changelog li {
    margin-bottom: 5px;
}

/* Ensure WordPress media uploader retains its default styles */
.media-modal .media-frame-title,
.media-modal .media-menu-item,
.media-modal .media-router {
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    background-color: inherit;
    box-shadow: none;
    border: none;
}



/* Responsive Design */

/* Card layout adjustment for smaller screens */
@media (max-width: 600px) {
    .smartgen-card {
        flex: 1 1 100%; /* Full width on small screens */
    }
}
