/* Base styles */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --success: #10b981;
    --error: #e11d48;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --border-radius: 0.5rem;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--gray-100);
    color: var(--gray-900);
    line-height: 1.5;
}

.container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.card {
    width: 100%;
    max-width: 28rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.card-content {
    padding: 1.5rem;
}

/* Progress Steps */
.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background-color: var(--gray-300);
    color: var(--gray-500);
    font-size: 1.25rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.step.active .step-icon {
    background-color: var(--primary);
    color: white;
}

.step.completed .step-icon {
    background-color: var(--primary);
    color: white;
}

.step-content {
    text-align: center;
}

.step-name {
    font-size: 0.875rem;
    font-weight: 500;
}

.step-description {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.step-line {
    height: 1px;
    background-color: var(--gray-300);
    flex: 1;
    margin: 0 0.5rem;
    position: relative;
    top: -1rem;
}

.step-line.active {
    background-color: var(--primary);
}

/* Sections */
.section {
    background-color: var(--gray-50);
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.125rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.account-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.account-icon {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 0.25rem;
}

.account-name {
    font-weight: 500;
}

/* Buttons */
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    border: 1px solid transparent;
}

.button.primary {
    background-color: var(--primary);
    color: white;
}

.button.primary:hover {
    background-color: var(--primary-hover);
}

.button.outline {
    background-color: transparent;
    border-color: var(--gray-300);
    color: var(--gray-700);
    text-decoration: none;
}

.button.outline:hover {
    background-color: var(--gray-50);
}

.button.full-width {
    width: 100%;
}

.button-icon {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

.link-button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    font-size: 0.875rem;
}

.link-button:hover {
    text-decoration: underline;
}

.icon-button {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0.25rem;
}

/* Links */
.link {
    color: var(--primary);
    text-decoration: none;
}

.link:hover {
    text-decoration: underline;
}

/* Actions */
.actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.disclaimer {
    font-size: 0.75rem;
    color: var(--gray-500);
    text-align: center;
}

/* Google Section */
.google-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.google-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.google-title {
    font-size: 1.125rem;
    font-weight: 500;
}

.account-info {
    border-top: 1px solid var(--gray-200);
    padding-top: 1rem;
}

.account-user {
    font-size: 0.875rem;
    color: var(--gray-600);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.account-email {
    font-weight: 500;
}

.account-section {
    margin-top: 1rem;
}

.account-section-title {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.account-selector {
    position: relative;
}

.selected-account {
    display: flex;
    align-items: center;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    padding: 0.5rem;
    background-color: var(--gray-100);
}

.account-tag {
    display: flex;
    align-items: center;
    background-color: var(--gray-200);
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.tag-remove {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    margin-left: 0.25rem;
    font-size: 1rem;
}

.dropdown-button {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    margin-left: auto;
}

.account-note {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 0.5rem;
}

/* Success Page */
.granted-accounts {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1rem;
}

.granted-account, .failed-account {
    display: flex;
    gap: 0.5rem;
}

.check-icon {
    color: var(--success);
    margin-top: 0.25rem;
}

.failed-icon {
    color: var(--error);
    margin-top: 0.25rem;
}

.granted-account-name, .failed-account-name {
    font-weight: 500;
}

.granted-account-user, .failed-account-user {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.view-access {
    margin-top: 1rem;
}

.success-message {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.success-text {
    font-size: 1.125rem;
}

.success-note {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-top: 1rem;
}

.back-link {
    margin-top: 1.5rem;
}

/* Icons */
.icon {
    display: inline-block;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 640px) {
    .progress-steps {
        padding: 1rem;
    }
    
    .step-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
    }
    
    .step-name {
        font-size: 0.75rem;
    }
    
    .step-description {
        font-size: 0.625rem;
    }
}

/* Checkbox list styles */
.checkbox-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid var(--gray-200);
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s;
}

.checkbox-item:hover {
    background-color: var(--gray-50);
}

.checkbox-item.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.checkbox-content {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.section-description {
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.coming-soon {
    font-size: 0.75rem;
    color: var(--gray-500);
    background-color: var(--gray-200);
    padding: 0.125rem 0.375rem;
    border-radius: 1rem;
    margin-left: auto;
}

/* Scope details styles */
.scope-group {
    margin-bottom: 1rem;
}

.scope-title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.scope-list {
    list-style-type: disc;
    padding-left: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-700);
}

.scope-list li {
    margin-bottom: 0.25rem;
}

/* Disabled button */
.button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Hidden element */
.hidden {
    display: none;
}

/* Add margin to the toggle button */
#toggle-details {
    margin-bottom: 1rem;
}

/* Add margin to scope details for better spacing when shown */
#scope-details {
    margin-top: 1rem;
}

/* Logo section styles */
.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
    text-align: center;
}

.elevar-logo {
    height: 40px;
}

.app-description h1 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.app-description p {
    color: var(--gray-600);
    line-height: 1.5;
}

/* Remove gray background from marketing channels section */
.marketing-channels {
    padding-bottom: 1.5rem;
}

/* Remove underline from sign-in button text */
.button.primary {
    text-decoration: none;
}

/* Checkbox item styling (without background) */
.checkbox-item {
    background-color: transparent;
}

.checkbox-item:hover {
    background-color: var(--gray-50);
}

/* Media queries for responsive design */
@media (min-width: 768px) {
    .logo-section {
        flex-direction: row;
        text-align: left;
        justify-content: center;
    }
    
    .elevar-logo {
        margin-bottom: 0;
    }
}

/* Update to logo section styles to keep it vertical on all screen sizes */
@media (min-width: 768px) {
    .logo-section {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
}

/* Styles for the confirm page */

/* Channel section */
.channel-section {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.channel-section:last-child {
    border-bottom: none;
}

.channel-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.channel-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

/* Account selection */
.account-selection {
    margin-top: 1rem;
}

.account-label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.account-help-text {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* Multi-select dropdown */
.multi-select-wrapper {
    position: relative;
    width: 100%;
}

.multi-select-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    background-color: white;
    cursor: pointer;
    min-height: 2.5rem;
}

.multi-select-header:hover {
    border-color: var(--gray-400);
}

.selected-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    flex: 1;
}

.placeholder {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.selected-tag {
    display: flex;
    align-items: center;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    gap: 0.25rem;
}

.remove-tag {
    background: none;
    border: none;
    color: var(--primary);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--gray-500);
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.multi-select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.25rem;
    background-color: white;
    border: 1px solid var(--gray-300);
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    z-index: 10;
    max-height: 15rem;
    overflow-y: auto;
}

.dropdown-search {
    padding: 0.5rem;
    border-bottom: 1px solid var(--gray-200);
    position: sticky;
    top: 0;
    background-color: white;
}

.search-input {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--gray-300);
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.dropdown-options {
    padding: 0.5rem;
}

.dropdown-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 0.25rem;
}

.dropdown-option:hover {
    background-color: var(--gray-100);
}

.dropdown-option label {
    cursor: pointer;
    font-size: 0.875rem;
    flex: 1;
}

/* User info section */
.user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.75rem;
    background-color: var(--gray-50);
    border-radius: 0.375rem;
    font-size: 0.875rem;
}

.user-email {
    font-weight: 500;
}

/* Loading indicator */
.loading-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 0;
}

.spinner {
    width: 2rem;
    height: 2rem;
    border: 3px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spinner 0.8s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spinner {
    to {
        transform: rotate(360deg);
    }
}

.no-channels {
    text-align: center;
    padding: 2rem 0;
    color: var(--gray-600);
}


.dropdown { position: relative; margin-bottom: 1.5rem; }
.dropdown-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: .5rem .75rem;
  border: 1px solid #d2d6dc;
  border-radius: .375rem;
  background: #fff;
}
.dropdown-toggle {
  background: transparent;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  margin-left: auto;
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + .25rem);
  left: 0;
  width: 100%;
  max-height: 15rem;
  overflow-y: auto;
  border: 1px solid #d2d6dc;
  background: #fff;
  border-radius: .375rem;
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
  display: none;
  z-index: 10;
}
.dropdown-menu.show { display: block; }
.dropdown-item {
  display: block;
  padding: .5rem .75rem;
  cursor: pointer;
}
.dropdown-item:hover {
  background: #f3f4f6;
}
.selected-placeholder {
  color: #4b5563;
  font-size: .875rem;
}
.chevron {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: #4b5563;
  stroke-width: 2;
}

#change-account-btn {
    font-size: 0.75rem;
}

.center {
    text-align: center;
    margin-bottom: 1rem;
}

/* Enhanced description */
.enhanced-description {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-700);
    margin-top: 0.5rem;
}

/* Info sections */
.info-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.info-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 1rem;
}

.info-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-700);
}

.info-content p {
    margin-bottom: 1rem;
}

.info-content p:last-child {
    margin-bottom: 0;
}

/* Steps */
.step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: 600;
    flex-shrink: 0;
}

.step-text {
    flex: 1;
    padding-top: 0.25rem;
}

.step-after {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--gray-300);
}

/* FAQ section */
.faq-section {
    padding: 1.5rem;
    border-bottom: 1px solid var(--gray-200);
}

.faq-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gray-900);
}

.faq-item {
    margin-bottom: 1rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.375rem;
    overflow: hidden;
}

.faq-question {
    font-size: 1rem;
    font-weight: 500;
    padding: 1rem;
    background-color: var(--gray-50);
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-question::after {
    content: "+";
    font-size: 1.25rem;
    color: var(--gray-600);
}

.faq-question:hover {
    background-color: var(--gray-100);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 1rem;
}

.faq-answer.open {
    padding: 1rem;
    border-top: 1px solid var(--gray-200);
}

.faq-answer p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--gray-700);
}

/* Footer */
.app-footer {
    padding: 1.5rem;
    text-align: center;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--gray-600);
    font-size: 0.875rem;
    text-decoration: none;
}

.footer-links a:hover {
    color: var(--primary);
    text-decoration: underline;
}

.footer-copyright {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* Center text */
.center {
    text-align: center;
}

/* Success Alert Styling */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin: 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: fadeIn 0.3s ease-in-out;
}

.alert-success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}