/* CallAgentAI - Admin Settings Styles */

/* Two-column layout for settings page */
.callagai-settings-container {
    display: flex;
    gap: 20px;
    margin-top: 20px;
}

.callagai-settings-form {
    flex: 1;
    max-width: 600px;
}

.callagai-settings-form .card {
    margin-top: 20px;
}

.callagai-settings-form .card h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
}

.callagai-settings-form .card ul {
    line-height: 1.8;
    margin: 0;
}

.callagai-instructions {
    flex: 1;
    max-width: 500px;
}

.callagai-instructions h2 {
    margin-top: 0;
}

.callagai-instructions .card {
    margin-bottom: 15px;
}

.callagai-instructions ol,
.callagai-instructions ul {
    line-height: 1.8;
}

.callagai-instructions code {
    display: block;
    padding: 10px;
    background: #f0f0f1;
    border-radius: 3px;
    font-size: 13px;
    margin: 5px 0;
    word-break: break-all;
}

.callagai-instructions .description {
    font-size: 13px;
    color: #646970;
}

/* Responsive layout for smaller screens */
@media screen and (max-width: 1200px) {
    .callagai-settings-container {
        flex-direction: column;
    }

    .callagai-settings-form,
    .callagai-instructions {
        max-width: 100%;
    }
}

/* Better card styling */
.callagai-instructions .card h3 {
    margin-top: 0;
    font-size: 16px;
    font-weight: 600;
}

.callagai-instructions .card li {
    margin-bottom: 10px;
}

.callagai-instructions .card li:last-child {
    margin-bottom: 0;
}

/* =============================================
   Plan Notification Styles
   ============================================= */

.callagai-plan-notification {
    background: #fff;
    border: 1px solid #c3c4c7;
    border-left: 4px solid #2271b1;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
    margin: 15px 0 20px;
    padding: 0;
    border-radius: 4px;
}

.plan-notification-header {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    background: #f6f7f7;
    border-bottom: 1px solid #c3c4c7;
}

.plan-notification-header .plan-icon {
    font-size: 20px;
    color: #2271b1;
    margin-right: 10px;
}

.plan-notification-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #1d2327;
}

.plan-notification-content {
    padding: 15px;
}

/* Loading state */
.plan-loading {
    display: flex;
    align-items: center;
    color: #646970;
}

.plan-loading .spinner {
    float: none;
    margin: 0 10px 0 0;
}

/* Account type badge */
.plan-account-type {
    margin-bottom: 15px;
}

.account-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-free {
    background: #f0f0f1;
    color: #646970;
}

.badge-trial {
    background: #fef8ee;
    color: #9a6700;
    border: 1px solid #dba617;
}

.badge-paid {
    background: #edfaef;
    color: #007017;
    border: 1px solid #00a32a;
}

/* Plan details grid */
.plan-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 15px;
}

@media screen and (max-width: 782px) {
    .plan-details-grid {
        grid-template-columns: 1fr;
    }
}

/* Plan cards */
.plan-card {
    border: 1px solid #dcdcde;
    border-radius: 4px;
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.plan-card.plan-active {
    border-color: #00a32a;
}

.plan-card.plan-inactive {
    border-color: #d63638;
    background: #fcf0f1;
}

.plan-card-header {
    display: flex;
    align-items: center;
    padding: 10px 12px;
    background: #f6f7f7;
    border-bottom: 1px solid #dcdcde;
    font-weight: 600;
    font-size: 13px;
}

.plan-card.plan-active .plan-card-header {
    background: #edfaef;
    border-bottom-color: #00a32a;
}

.plan-card.plan-inactive .plan-card-header {
    background: #fcf0f1;
    border-bottom-color: #d63638;
}

.plan-card-header .dashicons {
    margin-right: 8px;
    font-size: 16px;
}

.plan-card-body {
    padding: 12px;
}

.plan-name {
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 6px;
}

.plan-status {
    margin-bottom: 10px;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 500;
}

.status-badge.status-active {
    background: #edfaef;
    color: #007017;
}

.status-badge.status-inactive {
    background: #fcf0f1;
    color: #d63638;
}

.plan-usage {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: #646970;
}

.usage-value {
    font-weight: 600;
    color: #1d2327;
}

/* Plan actions */
.plan-actions {
    display: flex;
    gap: 10px;
    padding-top: 15px;
    border-top: 1px solid #dcdcde;
}

/* Plan warning */
.plan-warning {
    margin: 0 0 15px !important;
}

.plan-warning p {
    margin: 0;
}

/* Error state */
#plan-error {
    color: #1d2327;
}

/* Enhanced error display */
.plan-error-details {
    padding: 5px 0;
}

.plan-error-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f1;
}

.plan-error-header .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
    color: #d63638;
}

.plan-error-header strong {
    font-size: 15px;
    color: #d63638;
}

.plan-error-message {
    font-size: 13px;
    line-height: 1.6;
    color: #50575e;
    margin: 0 0 12px;
}

.plan-error-action {
    font-size: 13px;
    line-height: 1.6;
    color: #1d2327;
    margin: 0;
    padding: 10px 12px;
    background: #f6f7f7;
    border-radius: 4px;
    border-left: 3px solid #2271b1;
}

.plan-error-action a {
    color: #2271b1;
    text-decoration: none;
}

.plan-error-action a:hover {
    text-decoration: underline;
}

.plan-error-action code {
    display: inline;
    padding: 2px 6px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 3px;
    font-size: 12px;
}

/* Technical details (collapsible) */
.plan-error-technical {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f1;
}

.plan-error-technical summary {
    cursor: pointer;
    font-size: 12px;
    color: #646970;
    padding: 5px 0;
}

.plan-error-technical summary:hover {
    color: #2271b1;
}

.plan-error-technical ul {
    margin: 10px 0 0;
    padding: 10px 15px;
    background: #f6f7f7;
    border-radius: 4px;
    list-style: none;
    font-size: 12px;
    font-family: monospace;
}

.plan-error-technical li {
    margin-bottom: 5px;
    color: #50575e;
}

.plan-error-technical li:last-child {
    margin-bottom: 0;
}

.plan-error-technical li strong {
    color: #1d2327;
}
