/* General container styling */
.docswrite-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 20px;
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Header styling */
.docswrite-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.docswrite-logo-wrapper {
    flex: 0 0 auto;
}

.docswrite-logo {
    width: 120px;
    height: auto;
    display: block;
}

.docswrite-title-wrapper {
    flex: 1;
    text-align: right;
    padding-left: 30px;
}

.docswrite-title {
    font-size: 28px;
    font-weight: 600;
    color: #1e1e1e;
    margin: 0;
    line-height: 1.2;
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    .docswrite-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }

    .docswrite-title-wrapper {
        text-align: center;
        padding-left: 0;
    }

    .docswrite-logo {
        width: 100px;
        margin: 0 auto;
    }
}

/* Welcome banner styling */
.docswrite-welcome-banner {
    background-color: #e0f7fa;
    padding: 25px 30px;
    border-radius: 8px;
    margin-bottom: 40px;
}

.docswrite-welcome-banner p {
    color: #00796b;
    font-size: 16px;
    line-height: 1.6;
}

/* Navigation tabs */
.nav-tab-wrapper {
    border-bottom: 2px solid #ddd;
    margin-bottom: 40px;
    padding-bottom: 5px;
    gap: 10px;
}

.nav-tab {
    padding: 15px 30px;
    font-size: 16px;
    margin-right: 10px;
    @media screen and (max-width: 480px) {
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Connection status */
.docswrite-connection-status {
    margin-bottom: 40px;
}

.status-badge {
    padding: 8px 16px 8px 32px;  /* Extra left padding for icon */
    border-radius: 20px;
    font-size: 15px;
    font-weight: 600;
    position: relative;
    display: inline-flex;
    align-items: center;
}

.status-badge::before {
    content: '';
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

.status-badge.connected {
    background-color: #e6f4ea;
    color: #1e8e3e;
    border: 1px solid #1e8e3e;
}

.status-badge.connected::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%231e8e3e'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z'/%3E%3C/svg%3E");
}

.status-badge.disconnected {
    background-color: #fce8e6;
    color: #d93025;
    border: 1px solid #d93025;
}

.status-badge.disconnected::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d93025'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
}

/* Connection buttons with icons */
#connection-button {
    position: relative;
    padding-left: 36px;
    display: inline-flex;
    align-items: center;
}

#connection-button::before {
    content: '';
    position: absolute;
    left: 12px;
    width: 16px;
    height: 16px;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Connect button */
#connection-button.connect {
    background-color: #4688f4;
    color: white;
    border-color: #4688f4;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#connection-button.connect::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm5 11h-4v4h-2v-4H7v-2h4V7h2v4h4v2z'/%3E%3C/svg%3E");
}

#connection-button.connect:hover {
    background-color: #3b77db;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Disconnect button */
#connection-button.disconnect {
    background-color: #d93025;
    color: white;
    border-color: #d93025;
    padding: 12px 24px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

#connection-button.disconnect::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23d93025'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z'/%3E%3C/svg%3E");
}

#connection-button.disconnect:hover {
    background-color: #c1271d;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Form elements */
form p {
    margin-bottom: 15px;
}

form label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 16px;
}

form input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    margin-bottom: 15px;
    @media screen and (max-width: 480px) {
        padding: 12px;
    }
}

/* Button styling */
.button, form .button {
    padding: 12px 30px;
    font-size: 16px;
    border-radius: 6px;
    min-width: 140px;
    margin-right: 20px;
    letter-spacing: 0.3px;
}

.button.button-primary {
    padding: 14px 32px;
    font-weight: 600;
    @media screen and (max-width: 480px) {
        padding: 16px 24px;
        margin-bottom: 15px;
    }
}

/* Card/Section spacing */
.section-wrapper {
    margin-bottom: 25px;
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e2e4e7;
}

/* Typography improvements */
h3 {
    font-size: 24px;
    margin-bottom: 15px;
    line-height: 1.4;
}

p {
    font-size: 16px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* List spacing */
ul, ol {
    margin: 15px 0;
    padding-left: 30px;
}

li {
    margin-bottom: 10px;
    line-height: 1.6;
}

/* Table spacing */
table {
    margin: 15px 0;
    border-spacing: 0;
    border-collapse: separate;
    width: 100%;
}

th, td {
    padding: 10px 15px;
    border-bottom: 1px solid #e2e4e7;
    text-align: left;
}

/* Add spacing between groups of elements */
.form-group,
.content-section {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e4e7;
}

/* Last elements in groups - remove bottom spacing */
.form-group:last-child,
.content-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* Step Progress Container - Adding instructions */
.docswrite-wizard {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 10px;
}

/* Individual Step Items - Better visual hierarchy */
.docswrite-wizard .StepProgress-item {
    position: relative;
    counter-increment: list;
    padding: 30px;
    margin-bottom: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e2e4e7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0.7;
    cursor: pointer;
}

/* Step Numbers - Making them more prominent */
.docswrite-wizard .StepProgress-item::before {
    content: "Step " counter(list);
    position: absolute;
    top: -12px;
    left: 30px;
    background: #4688f4;
    color: white;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}

/* Status Indicators */
.docswrite-wizard .StepProgress-item::after {
    content: "Click to start";
    position: absolute;
    top: 40px;
    right: 30px;
    color: #666;
    font-size: 14px;
}

.docswrite-wizard .StepProgress-item.is-done::after {
    content: "✓ Completed";
    color: #4688f4;
    font-weight: 600;
}

.docswrite-wizard .StepProgress-item.current::after {
    content: "In Progress →";
    color: #4688f4;
    font-weight: 600;
}

/* Current Step - More prominent */
.docswrite-wizard .StepProgress-item.current {
    background: #fff;
    border: 2px solid #4688f4;
    opacity: 1;
    box-shadow: 0 4px 16px rgba(70, 136, 244, 0.1);
}

/* Step Content Layout - Better organization */
.docswrite-wizard .step-content {
    display: grid;
    gap: 20px;
    padding-right: 100px; /* Make room for status indicator */
}

/* Action area - Clear call to action */
.docswrite-wizard .step-action {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e2e4e7;
}

.docswrite-wizard .step-action::before {
    content: "Required Action:";
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    margin-bottom: 10px;
}

/* Helper Text */
.step-helper {
    font-size: 14px;
    color: #666;
    margin-top: 10px;
    padding-left: 20px;
    position: relative;
}

.step-helper::before {
    content: "💡";
    position: absolute;
    left: 0;
}

/* Visual Progress Line - Making it more prominent */
.docswrite-wizard .StepProgress::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30px;
    height: 100%;
    border-left: 4px solid #e2e4e7;
    z-index: 0;
    background: linear-gradient(to bottom, #4688f4 0%, #4688f4 var(--progress, 0%), #e2e4e7 var(--progress, 0%)); /* Dynamic progress */
}

/* Individual Step Items - Improving visual feedback */
.docswrite-wizard .StepProgress-item {
    position: relative;
    counter-increment: list;
    padding: 20px;
    margin-bottom: 20px;
    background: #fff; /* Lighter background for better contrast */
    border-radius: 12px;
    border: 1px solid #e2e4e7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    opacity: 0.7; /* Dim inactive steps */
}

/* Hover and Focus States - Better interaction feedback */
.docswrite-wizard .StepProgress-item:hover,
.docswrite-wizard .StepProgress-item:focus-within {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0.9;
}

/* Completed Steps - Success state */
.docswrite-wizard .StepProgress-item.is-done {
    background: #f8fff8;
    opacity: 1;
}

/* Step Numbers/Checkmarks - Better visibility */
.docswrite-wizard .StepProgress-item::after {
    content: '';
    position: absolute;
    top: 40px;
    left: -47px;
    width: 36px; /* Slightly larger */
    height: 36px;
    border: 3px solid #ccc;
    border-radius: 50%;
    background-color: #FFF;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Step Titles - Clear hierarchy */
.docswrite-wizard .StepProgress strong {
    display: block;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1e1e1e;
}

/* Step Description - Better readability */
.docswrite-wizard .StepProgress p {
    font-size: 16px;
    line-height: 1.6;
    color: #50575e;
    margin-bottom: 20px;
    max-width: 600px; /* Control line length */
}

/* Action Buttons - Clear call to action */
.docswrite-wizard .step-action {
    margin-top: 25px;
}

.docswrite-wizard .button {
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 500;
    min-width: 160px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Primary Action Button */
.docswrite-wizard .button-primary {
    background: #4688f4;
    color: white;
    border: none;
    box-shadow: 0 2px 4px rgba(70, 136, 244, 0.2);
}

.docswrite-wizard .button-primary:hover {
    background: #3b77db;
}

/* Secondary Action Button */
.docswrite-wizard .button-secondary {
    background: #f8f9fa;
    color: #4688f4;
    border: 1px solid #4688f4;
}

/* Loading States */
.docswrite-wizard .button.is-loading {
    pointer-events: none;
    opacity: 0.8;
}

.docswrite-wizard .button.is-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid transparent;
    border-radius: 50%;
    border-top-color: currentColor;
    animation: spin 0.8s linear infinite;
    margin-left: 8px;
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    .docswrite-wizard .StepProgress-item,
    .docswrite-wizard .button {
        transition: none;
    }
}

/* Screen Reader Text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Mobile Responsiveness */
@media screen and (max-width: 782px) {
    .docswrite-wizard .StepProgress {
        padding-left: 45px;
        margin: 30px auto;
    }
    
    .docswrite-wizard .StepProgress-item {
        padding: 25px;
    }
    
    .docswrite-wizard .button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Video Section */
.video-section {
    margin-bottom: 40px;
}

.video-section h2 {
    font-size: 24px;
    margin-bottom: 20px;
    color: #1e1e1e;
}

.video-wrapper {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Setup Steps - Horizontal Layout */
.setup-steps {
    display: flex;
    align-items: stretch;
    justify-content: space-between; /* Distribute space evenly */
    max-width: 100%;
    margin: 40px auto;
    gap: 20px; /* Reduced gap for better fit */
    padding: 20px;
    box-sizing: border-box; /* Ensure padding is included in width */
}

.step {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between; /* Ensure content is spaced evenly */
    width: 100%; /* Full width for each step */
    min-width: 200px; /* Adjusted minimum width */
    padding: 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    box-sizing: border-box; /* Ensure padding is included in width */
    text-align: center; /* Center text */
}

/* Connecting Line */
.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -10px; /* Adjusted to match the reduced gap */
    width: 20px;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .setup-steps {
        flex-direction: column;
        gap: 20px; /* Adjusted gap for mobile */
    }

    .step {
        width: 100%;
        min-width: auto;
    }

    .step:not(:last-child)::after {
        right: auto;
        top: auto;
        bottom: -20px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 20px;
    }
}

/* Step Indicator */
.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
    width: 100%;
}

.step-number {
    width: 36px;
    height: 36px;
    background: #4688f4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    position: relative;
    z-index: 2;
}

/* Step Content */
.step-content {
    text-align: center; /* Center align text */
    width: 100%;
    padding: 20px;
    border: 1px solid #d1d5db; /* Light gray border */
    border-radius: 8px; /* Rounded corners */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
    background-color: #f9fafb; /* Light background for contrast */
    margin-bottom: 20px; /* Space between steps */
}

.step-content h3 {
    font-size: 1.25rem; /* Slightly larger font for headings */
    color: #111827; /* Darker text color for contrast */
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.step-content p {
    color: #4b5563; /* Medium gray for text */
    font-size: 1rem; /* Consistent font size */
    line-height: 1.6;
    margin: 0 0 15px 0;
}

/* Button styling within steps */
.step .button-modern {
    display: inline-block;
    padding: 10px 20px;
    font-size: 1rem;
    color: #ffffff;
    background-color: #3b82f6; /* Blue button color */
    border: none;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.step .button-modern:hover {
    background-color: #2563eb; /* Darker blue on hover */
}

/* Active and Completed States */
.step.active .step-number {
    background: #4688f4;
    box-shadow: 0 0 0 4px rgba(70, 136, 244, 0.2);
}

.step.completed .step-number {
    background: #34d399;
}

.step.completed::after {
    background: #34d399;
}

/* Video Section Styling */
.video-section {
    max-width: 800px;
    margin: 60px auto 40px;
    padding: 0 20px;
}

.video-section h2 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 30px;
    color: #1e1e1e;
}

.video-wrapper {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .setup-steps {
        flex-direction: column;
        gap: 40px;
    }

    .step {
        width: 100%;
        min-width: auto;
    }

    .step:not(:last-child)::after {
        right: auto;
        top: auto;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 2px;
        height: 40px;
    }

    .step-content p {
        min-height: auto;
    }

    .video-section {
        margin-top: 40px;
    }
}

/* Getting Started Layout */
.getting-started-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* Setup Steps - Horizontal Layout */
.setup-steps {
    display: flex;
    align-items: stretch;
    gap: 60px;
    margin-bottom: 60px;
    position: relative;
    padding: 0 20px;
}

.step {
    flex: 1;
    position: relative;
    text-align: center;
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

/* Connecting Line */
.step:first-child::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -60px; /* Matches the gap */
    width: 60px;
    height: 2px;
    background: #e5e7eb;
    transform: translateY(-50%);
}

/* Step Indicator */
.step-indicator {
    margin-bottom: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: #4688f4;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 18px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Step Content */
.step-content h3 {
    font-size: 20px;
    color: #1e1e1e;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.step-content p {
    color: #6b7280;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    min-height: 48px;
}

/* Button styling */
.button-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    background: #4688f4;
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    min-width: 160px;
}

.button-modern:hover {
    background: #3b77db;
    transform: translateY(-1px);
    color: white;
}

/* Tutorial Section */
.tutorial-section {
    max-width: 800px;
    margin: 60px auto;
    text-align: center;
}

.tutorial-title {
    font-size: 24px;
    color: #1e1e1e;
    margin-bottom: 30px;
    text-align: center;
}

.tutorial-content {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
}

.video-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive Adjustments */
@media screen and (max-width: 782px) {
    .setup-steps {
        flex-direction: column;
        gap: 30px;
    }

    .step:first-child::after {
        content: '';
        position: absolute;
        top: auto;
        right: auto;
        bottom: -30px;
        left: 50%;
        width: 2px;
        height: 30px;
        transform: translateX(-50%);
    }

    .step-content p {
        min-height: auto;
    }

    .tutorial-section {
        margin-top: 40px;
    }

    .tutorial-content {
        padding: 20px;
    }
}