/* Admin panel styling */
.wrap h1 {
    margin-bottom: 20px;
}

.form-table th {
    padding: 20px 10px 20px 0;
    width: 200px;
}

.package-protection-admin-header {
    background: #fff;
    border: 1px solid #ccd0d4;
    border-left: 4px solid #00a0d2;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    margin: 20px 0;
    padding: 12px;
}

.package-protection-admin-header h2 {
    margin: 0;
}

.package-protection-form-wrapper {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
    padding: 20px;
    margin-bottom: 20px;
}

.form-table .wp-color-result {
    margin-bottom: 0;
}

.package-protection-version {
    color: #999;
    font-size: 0.8em;
}

.nav-tab-wrapper {
    margin-bottom: 15px;
}

/* OrderCtrl Dashboard */

.orderctrl-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.orderctrl-logo h2 {
    margin: 0;
    color: #23282d;
    font-size: 22px;
}

.orderctrl-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-connected {
    color: #46b450;
    font-weight: 500;
}

.status-disconnected {
    color: #dc3232;
    font-weight: 500;
    margin-right: 10px;
}

.orderctrl-dashboard-content {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.orderctrl-card {
    background: #fff;
    border-radius: 5px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
    display: flex;
    flex-direction: column;
}

.orderctrl-card h3 {
    margin-top: 0;
    color: #23282d;
}

.orderctrl-card p {
    margin-bottom: 20px;
    flex-grow: 1;
}

.orderctrl-card-coming-soon {
    opacity: 0.7;
}

.coming-soon-badge {
    display: inline-block;
    background: #f0f0f1;
    color: #50575e;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    align-self: flex-start;
}

/* OrderCtrl Dashboard */
.orderctrl-dashboard {
    max-width: 1200px;
    margin: 50px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Hero Section - Not Connected */
.orderctrl-hero {
    display: flex;
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

.orderctrl-hero-content {
    flex: 1;
    padding: 40px;
}

.orderctrl-hero-image {
    flex: 1;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.orderctrl-hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

.orderctrl-logo img {
    height: 100%;
	max-width: 200px;
    width: auto;
}

.orderctrl-hero h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    color: #23282d;
}

.orderctrl-animated-heading h2 {
    font-size: 26px;
    font-weight: 600;
    margin: 20px 0;
    line-height: 1.4;
}

.heading-static {
    display: block;
}

.heading-dynamic {
    display: block;
    color: #0073aa;
}

.orderctrl-hero-description {
    font-size: 16px;
    line-height: 1.6;
    color: #50575e;
    margin-bottom: 30px;
}

.orderctrl-cta {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Features Section */
.orderctrl-features {
    background: #ffffff;
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.orderctrl-features h2 {
    font-size: 24px;
    font-weight: 600;
    margin-top: 0;
    text-align: center;
    color: #23282d;
}

.feature-subtitle {
    text-align: center;
    font-size: 16px;
    color: #50575e;
    margin-bottom: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.orderctrl-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.orderctrl-feature-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 25px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.orderctrl-feature-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.feature-icon {
    font-size: 36px;
    color: #0073aa;
    margin-bottom: 15px;
}

.orderctrl-feature-card h3 {
    font-size: 18px;
    margin: 10px 0;
    color: #23282d;
}

.orderctrl-feature-card p {
    font-size: 14px;
    color: #50575e;
    margin-bottom: 0;
}

/* Platforms Section */
.orderctrl-platforms {
    margin: 40px 0;
    text-align: center;
}

.platform-icons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 25px;
    margin-top: 20px;
}

.platform-icons img {
    height: 40px;
    width: auto;
    filter: grayscale(100%);
    opacity: 0.7;
    transition: filter 0.3s ease, opacity 0.3s ease;
}

.platform-icons img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* Testimonial */
.orderctrl-testimonial {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 30px;
    margin: 40px 0;
    text-align: center;
}

.orderctrl-testimonial blockquote {
    font-size: 20px;
    color: #23282d;
    font-style: italic;
    margin: 0;
    padding: 0;
    border: none;
}

.orderctrl-testimonial cite {
    display: block;
    font-size: 16px;
    margin-top: 15px;
    color: #50575e;
    font-style: normal;
}

/* Bottom CTA */
.orderctrl-bottom-cta {
    text-align: center;
    margin: 40px 0 10px;
}

.cta-subtext {
    margin-top: 15px;
    color: #50575e;
}

/* Connected Dashboard */
.orderctrl-connected-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.orderctrl-status {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status-connected {
    color: #46b450;
    font-weight: 600;
    font-size: 16px;
}

.orderctrl-overview-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.overview-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.overview-card h3 {
    margin-top: 0;
    font-size: 18px;
    border-bottom: 1px solid #f0f0f1;
    padding-bottom: 15px;
    margin-bottom: 15px;
}

.orderctrl-services {
    margin: 0;
    padding: 0;
    list-style: none;
}

.orderctrl-services li {
    display: flex;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f1;
}

.orderctrl-services li:last-child {
    border-bottom: none;
}

.service-icon {
    margin-right: 10px;
    font-size: 20px;
    color: #0073aa;
}

.service-name {
    flex-grow: 1;
    font-weight: 500;
}

.service-settings {
    text-decoration: none;
}

.service-inactive {
    opacity: 0.7;
}

.service-status {
    background: #f0f0f1;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 12px;
    color: #50575e;
}

.orderctrl-stats {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

.stat-item {
    text-align: center;
    flex: 1;
}

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

.stat-label {
    font-size: 14px;
    color: #50575e;
}

.overview-link {
    display: block;
    text-align: right;
    text-decoration: none;
    margin-top: 10px;
}

.orderctrl-help {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.orderctrl-help h3 {
    margin-top: 0;
}

/* Settings Pages - Modern Card Layout */
.orderctrl-settings {
    max-width: 1200px;
    margin: 0 auto;
}

.orderctrl-settings-header {
    background: #ffffff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.orderctrl-settings-header h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #23282d;
}

.orderctrl-version {
    color: #999;
    font-size: 14px;
    background: #f0f0f1;
    padding: 4px 12px;
    border-radius: 12px;
}

.settings-card {
    background: #ffffff;
    border-radius: 8px;
    padding: 0;
    margin-bottom: 25px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

.settings-card-header {
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    padding: 20px 25px;
}

.settings-card-header h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #23282d;
}

.settings-card-header p {
    margin: 5px 0 0 0;
    color: #50575e;
    font-size: 14px;
}

.settings-card-body {
    padding: 25px;
}

.settings-row {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 20px;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f1;
}

.settings-row:last-child {
    border-bottom: none;
}

.settings-label {
    font-weight: 600;
    color: #23282d;
    padding-top: 5px;
}

.settings-label-description {
    font-size: 13px;
    color: #50575e;
    margin-top: 5px;
    font-weight: normal;
}

.settings-value {
    color: #50575e;
}

.settings-value code {
    background: #f1f1f1;
    padding: 4px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #23282d;
}

.settings-value input[type="text"],
.settings-value input[type="url"],
.settings-value input[type="number"],
.settings-value select,
.settings-value textarea {
    width: 100%;
    max-width: 500px;
}

.settings-value .description {
    font-size: 13px;
    color: #666;
    margin-top: 8px;
    font-style: normal;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 500;
}

.status-badge.success {
    background: #d4edda;
    color: #155724;
}

.status-badge.success::before {
    content: "✓";
    margin-right: 5px;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.warning::before {
    content: "⚠";
    margin-right: 5px;
}

.status-badge.error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.error::before {
    content: "✕";
    margin-right: 5px;
}

.settings-actions {
    display: flex;
    gap: 10px;
    padding: 20px 25px;
    background: #f8f9fa;
    border-top: 1px solid #e0e0e0;
}

.settings-notice {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 15px 20px;
    margin: 20px 0;
    border-radius: 4px;
}

.settings-notice.info {
    background: #d1ecf1;
    border-left-color: #0c5460;
}

.settings-notice.success {
    background: #d4edda;
    border-left-color: #155724;
}

.settings-notice.error {
    background: #f8d7da;
    border-left-color: #721c24;
}

.settings-notice h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.settings-notice p {
    margin: 0;
    font-size: 14px;
}

/* Form Table Override for Settings Pages */
.orderctrl-settings .form-table {
    background: transparent;
}

.orderctrl-settings .form-table th,
.orderctrl-settings .form-table td {
    padding: 15px 0;
}

.orderctrl-settings .form-table th {
    font-weight: 600;
    color: #23282d;
    width: 250px;
}

/* Settings Toggle Switch */
.settings-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.settings-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #0073aa;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

/* SSO Settings Specific Styles */
.settings-subsection {
    padding: 20px 0;
    border-bottom: 1px solid #f0f0f1;
}

.settings-subsection:last-child {
    border-bottom: none;
}

.settings-subsection h3 {
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: 600;
    color: #23282d;
}

.endpoint-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.endpoint-item {
    background: #f8f9fa;
    padding: 12px 15px;
    border-radius: 4px;
    font-size: 14px;
}

.endpoint-item strong {
    display: block;
    margin-bottom: 5px;
    color: #23282d;
    font-size: 13px;
}

.endpoint-item code {
    background: #ffffff;
    padding: 6px 10px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #d63638;
    border: 1px solid #e0e0e0;
    display: block;
    word-break: break-all;
}

.endpoint-item a {
    color: #0073aa;
    text-decoration: none;
}

.endpoint-item a:hover {
    text-decoration: underline;
}

.architecture-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.architecture-item h4 {
    margin: 0 0 10px 0;
    font-size: 15px;
    font-weight: 600;
    color: #23282d;
}

.architecture-item p {
    margin: 0 0 10px 0;
    color: #50575e;
    font-size: 14px;
    line-height: 1.6;
}

.architecture-item ul {
    margin: 10px 0;
    padding-left: 20px;
}

.architecture-item li {
    margin: 5px 0;
    color: #50575e;
    font-size: 14px;
}

.architecture-item ol {
    margin: 10px 0;
    padding-left: 20px;
}

.architecture-item ol li {
    margin: 8px 0;
    color: #50575e;
    font-size: 14px;
    line-height: 1.5;
}

.architecture-item code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #d63638;
}

.test-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.config-value {
    background: #f8f9fa;
    padding: 6px 12px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #23282d;
    border: 1px solid #e0e0e0;
    display: inline-block;
}

.status-badge.status-success {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-success::before {
    content: "✓";
    margin-right: 5px;
}

.status-badge.status-warning {
    background: #fff3cd;
    color: #856404;
}

.status-badge.status-warning::before {
    content: "⚠";
    margin-right: 5px;
}

.status-badge.status-error {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-error::before {
    content: "✕";
    margin-right: 5px;
}

.status-badge.status-info {
    background: #d1ecf1;
    color: #0c5460;
}

.settings-card-danger {
    border: 2px solid #f8d7da;
}

.settings-card-danger .settings-card-header {
    background: #fff5f5;
    border-bottom: 1px solid #f8d7da;
}

.settings-card-danger .settings-card-header h2 {
    color: #721c24;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .orderctrl-hero {
        flex-direction: column;
    }

    .orderctrl-overview-cards {
        grid-template-columns: 1fr;
    }

    .orderctrl-hero-content,
    .orderctrl-hero-image {
        padding: 25px;
    }

    .settings-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .orderctrl-settings-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .test-buttons {
        flex-direction: column;
    }

    .test-buttons .button {
        width: 100%;
    }
}

/* 2.1: read-only values (settings are managed in OrderCtrl) */
.settings-toggle.is-readonly,
.settings-toggle.is-readonly .toggle-slider {
    cursor: default;
    vertical-align: middle;
}

.settings-toggle.is-readonly input:checked + .toggle-slider {
    background-color: #15803d;
}

.toggle-state {
    margin-left: 8px;
    vertical-align: middle;
    font-weight: 500;
    color: #23282d;
}

.orderctrl-settings .settings-notice .button {
    margin-top: 0;
}

.orderctrl-tier-table {
    max-width: 500px;
}

.orderctrl-swatch {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1px solid #dcdcde;
    vertical-align: middle;
}

.orderctrl-preview {
    max-width: 420px;
}

.orderctrl-services .status-badge {
    margin-right: 12px;
}

.orderctrl-logo img {
    max-height: 48px;
    width: auto;
}
