/* Admin-specific styles */
.streamline-admin-wrap {
    margin: 20px;
    max-width: 1200px;
}

.streamline-admin-header {
    margin-bottom: 30px;
}

.streamline-admin-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
}

.streamline-admin-subtitle {
    color: #666;
    font-size: 16px;
}

.streamline-admin-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.streamline-admin-form {
    max-width: 600px;
}

.streamline-admin-form .form-group {
    margin-bottom: 20px;
}

.streamline-admin-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.streamline-admin-form input[type="text"],
.streamline-admin-form input[type="email"],
.streamline-admin-form input[type="password"],
.streamline-admin-form select,
.streamline-admin-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.streamline-admin-form input[type="text"]:focus,
.streamline-admin-form input[type="email"]:focus,
.streamline-admin-form input[type="password"]:focus,
.streamline-admin-form select:focus,
.streamline-admin-form textarea:focus {
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
    outline: none;
}

.streamline-admin-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.streamline-admin-button:hover {
    background: #005177;
}

.streamline-admin-notice {
    padding: 12px;
    margin-bottom: 20px;
    border-left: 4px solid #0073aa;
    background: #f0f6fc;
}

.streamline-admin-notice.success {
    border-left-color: #46b450;
    background: #ecf7ed;
}

.streamline-admin-notice.error {
    border-left-color: #dc3232;
    background: #fbeaea;
}

.streamline-admin-notice.warning {
    border-left-color: #ffb900;
    background: #fff8e5;
}

/* Agent Cards Grid */
.pfc-assistants-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    margin-bottom: 30px;
    justify-content: space-between;
}

/* Agent Card */
.pfc-assistant-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    flex: 0 1 calc(33.333% - 24px); /* Three cards per row with gap */
    min-width: 300px; /* Minimum width for cards */
    max-width: calc(33.333% - 24px); /* Maximum width for cards */
}

@media (max-width: 1200px) {
    .pfc-assistant-card {
        flex: 0 1 calc(50% - 24px); /* Two cards per row on medium screens */
        max-width: calc(50% - 24px);
    }
}

@media (max-width: 768px) {
    .pfc-assistant-card {
        flex: 0 1 100%; /* One card per row on small screens */
        max-width: 100%;
    }
}

.pfc-assistant-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #008060, #00b894);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.pfc-assistant-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: #008060;
}

.pfc-assistant-card:hover::before {
    opacity: 1;
}

.pfc-assistant-card__header {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.pfc-assistant-card__header-content {
    flex: 1;
    margin-left: 16px;
}

.pfc-assistant-card__icon {
    font-size: 28px;
    background: #f0f9f4;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #008060;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.pfc-assistant-card:hover .pfc-assistant-card__icon {
    background: #008060;
    color: white;
    transform: scale(1.1);
}

.pfc-assistant-card__title {
    margin: 0 0 4px;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.pfc-assistant-card__status {
    display: inline-block;
    padding: 4px 8px;
    background: #e6f4ea;
    color: #008060;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.pfc-assistant-card:hover .pfc-assistant-card__title {
    color: #008060;
}

.pfc-assistant-card__content {
    margin-bottom: 24px;
    flex: 1;
}

.pfc-assistant-card__info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pfc-assistant-card__info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pfc-assistant-card__info-label {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.pfc-assistant-card__info-value {
    font-size: 14px;
    color: #1a1a1a;
    background: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: monospace;
}

.pfc-assistant-card__actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
    flex-wrap: wrap;
}

.pfc-assistant-card__actions .pfc-button {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

/* Modal Styles */
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.popup-modal[style*="display: block"],
.popup-modal.show {
    display: flex !important;
}

.modal-content {
    position: relative;
    background-color: #fff;
    padding: 0;
    width: 90%;
    max-width: 500px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header p {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
}

.close-popup-button {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
    padding: 0;
    line-height: 1;
}

.close-popup-button:hover {
    color: #000;
}

.popup-content {
    padding: 24px;
}

.selected-plan-info {
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #e5e5e5;
}

.selected-plan-info h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
}

.selected-plan-info p {
    margin: 0;
    color: #666;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.pfc-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.pfc-input:focus {
    border-color: #008060;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 128, 96, 0.2);
}

.form-actions {
    margin-top: 24px;
    text-align: right;
}

.pfc-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s;
}

.pfc-button--primary {
    background-color: #008060;
    color: white;
}

.pfc-button--primary:hover {
    background-color: #006e52;
}

.pfc-button__icon {
    margin-right: 8px;
}

/* Empty State */
.pfc-empty-state {
    text-align: center;
    padding: 48px 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 2px dashed #e5e7eb;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.pfc-empty-state:hover {
    border-color: #008060;
    background: #f0f9f4;
}

.pfc-empty-state__icon {
    font-size: 48px;
    margin-bottom: 20px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

.pfc-empty-state__title {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 12px;
}

.pfc-empty-state__description {
    color: #666;
    margin: 0 0 24px;
    font-size: 16px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.pfc-empty-state .pfc-button {
    margin-top: 16px;
}

/* Connect Button */
.pfc-connect-button-wrapper {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/* Container and Box */
.pfc-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

.pfc-box {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 30px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pfc-box-content {
    max-width: 100%;
}

/* Page Header */
.Polaris-Page-Header {
    margin-bottom: 30px;
    text-align: center;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
}

.Polaris-Header-Title__TitleWithSubtitle {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 8px;
}

.Polaris-Text--bodySm {
    color: #666;
    margin: 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

.pfc-subscription-info {
    background: white;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.pfc-info-group {
    margin-bottom: 24px;
}

.pfc-info-group:last-child {
    margin-bottom: 0;
}

.pfc-info-group h3 {
    font-size: 16px;
    margin: 0 0 12px 0;
    color: #1d1d1f;
    font-weight: 600;
}

.pfc-info-group p {
    margin: 8px 0;
    color: #6e6e73;
    font-size: 14px;
    line-height: 1.4;
}

.pfc-info-group p strong {
    color: #1d1d1f;
    font-weight: 500;
}

.pfc-subscription-details {
    margin-bottom: 24px;
}

.pfc-subscription-info__actions {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

.pfc-subscription-info__actions .pfc-button {
    margin-right: 12px;
}

/* Billing Page Styles */
.pfc-plans-header {
    margin-bottom: 32px;
    text-align: center;
}

.pfc-plans-header h2 {
    font-size: 24px;
    margin: 0 0 8px 0;
    color: #1d1d1f;
}

.pfc-plans-header p {
    color: #6e6e73;
    margin: 0;
}

.pfc-plans-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.pfc-plan-card {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pfc-plan-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.pfc-plan-card--featured {
    border: 2px solid #008060;
    position: relative;
}

.pfc-plan-card--featured::before {
    content: 'Most Popular';
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: #008060;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.pfc-plan-card__header {
    text-align: center;
    margin-bottom: 24px;
}

.pfc-plan-card__header h3 {
    font-size: 20px;
    margin: 0 0 12px 0;
    color: #1d1d1f;
}

.pfc-plan-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
}

.pfc-plan-card__amount {
    font-size: 32px;
    font-weight: 600;
    color: #1d1d1f;
}

.pfc-plan-card__period {
    color: #6e6e73;
    font-size: 16px;
}

.pfc-plan-card__features {
    margin-bottom: 24px;
    flex: 1;
}

.pfc-plan-card__features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pfc-plan-card__features li {
    padding: 8px 0;
    color: #1d1d1f;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pfc-plan-card__features li::before {
    content: '✓';
    color: #008060;
    font-weight: bold;
}

.pfc-plan-card .pfc-button {
    width: 100%;
}

/* Payment Modal Specific Styles */
#payment-modal .popup-content {
    text-align: left;
}

.pfc-payment-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.pfc-payment-plan h3 {
    margin: 0 0 8px 0;
    font-size: 20px;
    color: #1d1d1f;
}

.pfc-payment-plan p {
    margin: 0;
    font-size: 16px;
    color: #008060;
    font-weight: 600;
}

.pfc-payment-features {
    margin-top: 16px;
}

.pfc-payment-features ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.pfc-payment-features li {
    padding: 4px 0;
    color: #6c757d;
    font-size: 14px;
}

.pfc-payment-features li:before {
    content: '✓';
    color: #008060;
    font-weight: bold;
    margin-right: 8px;
}

.pfc-payment-form {
    max-width: none;
}

.pfc-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 16px;
}

@media (max-width: 768px) {
    .pfc-form-row {
        grid-template-columns: 1fr;
    }
}

.pfc-payment-form .pfc-form-group {
    margin-bottom: 16px;
}

.pfc-payment-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #1d1d1f;
    font-size: 14px;
}

.pfc-payment-form input,
.pfc-payment-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.pfc-payment-form input:focus,
.pfc-payment-form select:focus {
    outline: none;
    border-color: #008060;
    box-shadow: 0 0 0 3px rgba(0, 128, 96, 0.1);
}

.pfc-card-element {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
}

.pfc-error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 4px;
}

.pfc-button--full {
    width: 100%;
    justify-content: center;
    padding: 14px 20px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.pfc-button__spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 8px;
}

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

.pfc-button__text {
    transition: opacity 0.2s ease;
} 