/*
Theme Name: iforai-theme
Description: Interfaces for AI - AI-Powered Tool Generation Platform.
Author: Metehan Turkdonmez
Version: 1.4
Text Domain: iforai-theme
*/

/* ========================= PAGE LOADER ========================= */

/* Full Page Loader */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.loaded {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    animation: fadeInUp 0.8s ease-out;
}

.loader-logo {
    width: auto;
    width: 200px;
    height: 20px;
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.loader-text h2 {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px 0;
    font-family: var(--font-primary);
}

.loader-text p {
    font-size: 16px;
    color: #6b7280;
    margin: 0;
    font-family: var(--font-primary);
}

.loader-spinner {
    margin-top: 16px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Loader Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

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

/* Mobile responsive for loader */
@media (max-width: 768px) {

    
    .loader-text p {
        font-size: 14px;
    }
    
    .spinner {
        width: 32px;
        height: 32px;
    }
}

/* Arrow System Styles */
@import url('assets/css/arrows.css');

/* Global Veriables */



:root {
    --primary-color: #4285F4;
    --secondary-color: #211F8D;
    --text-color: #333333;
    --background-color: #ffffff;
    --secondary-background-color: #d0e2ff;
    
    /* Font Families */
    --font-primary: 'Roboto', sans-serif;
    --font-heading: 'Varela Round', sans-serif;
    --font-code: 'Roboto Mono', monospace;
}


html{
    margin-top: 0px;
    padding-top: 0px;
}

/* Base Typography */
body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* === Wide Modal for About Platform === */
.modal-content-wide {
    max-width: 768px !important;
    width: 90vw !important;
    max-height: 90vh !important;
}

.modal-content-wide .modal-body {
    max-height: calc(90vh - 120px) !important;
    overflow-y: auto !important;
}

@media (max-width: 768px) {
    .modal-content-wide {
        max-width: 100% !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
    }
    
    .modal-content-wide .modal-body {
        max-height: 100% !important;
    }
}

html, body {
  /* Only prevent overscroll on page level, allow canvas to scroll freely */
  overscroll-behavior: contain;
}

a.site-logo img {
    height: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 400;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Code elements */
code, pre, kbd, samp {
    font-family: var(--font-code);
}

/* Google Material Icons */
.material-icons {
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-feature-settings: 'liga';
    font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
}

/* Google Material Symbols */
.material-symbols-outlined,
.material-symbols-rounded {
    font-variation-settings:
        'FILL' 0,
        'wght' 400,
        'GRAD' 0,
        'opsz' 24;
    font-size: 24px;
    line-height: 1;
    display: inline-block;
    vertical-align: middle;
}

.material-symbols-outlined {
    font-family: 'Material Symbols Outlined';
}

.material-symbols-rounded {
    font-family: 'Material Symbols Rounded';
}

/* Icon sizes */
.icon-small { font-size: 16px; }
.icon-medium { font-size: 24px; }
.icon-large { font-size: 32px; }
.icon-xl { font-size: 48px; }

/* Icon colors */
.icon-primary { color: var(--primary-color); }
.icon-secondary { color: var(--secondary-color); }
.icon-text { color: var(--text-color); }

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.5rem;
}

/* Header Styles */

header.site-header{
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 0px rgba(0, 0, 0, 0.1);
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    background-color: var(--background-color);
    padding: 0 0px;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 15px;
}

.gemini-api-button {
    position: relative;
    transition: background-color 0.2s ease;
    padding: 10px;
    width: 46px;
    height: 46px;
    display: flex;
    border-radius: 100%;
    border: none;
    justify-content: center;
    align-items: center;
    background: #f4f9fe;
}

.gemini-api-button:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.gemini-api-button .material-icons,
.gemini-api-button .material-symbols-outlined {
    font-size: 24px;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

/* Icon color variations based on connection status */
.gemini-api-button .material-symbols-outlined[data-status="connected"] {
    color: #34a853; /* Green for connected */
}

.gemini-api-button .material-symbols-outlined[data-status="disconnected"] {
    color: #ea4335; /* Red for disconnected */
}

.gemini-api-button .material-symbols-outlined[data-status="testing"] {
    color: #fbbc04; /* Yellow for testing */
}

.api-status-indicator {
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: 2px solid white;
    display: none;
}

.api-status-indicator.connected {
    background-color: #34a853;
    display: block;
}

.api-status-indicator.error {
    background-color: #ea4335;
    display: block;
}

.api-status-indicator.testing {
    background-color: #fbbc04;
    display: block;
    animation: pulse 1s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

#wpadminbar{
    display: none;
}

button.first-menu-open-button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

button.first-menu-open-button svg{
    fill: #fff;
}

button.first-menu-open-button rect{
    fill: var(--primary-color)!important;
    stroke: transparent;
}

button.first-menu-open-button rect:first-child{
    fill: #fff!important;
}

button.first-menu-open-button:hover rect {
    fill: #fff!important;
}

button.first-menu-open-button:hover rect:first-child {
    fill: var(--primary-color)!important;
}

a.site-logo {
    padding: 15px;
    display: flex;
    width: fit-content;
}

/* Mega Menu */

nav.mega-menu {
    display: flex;
    background: var(--secondary-background-color);
    width: fit-content;
    border-radius: 10px;
    padding: 15px;
    box-shadow: 0 3px 4px 2px #f7f7f7;
    flex-direction: row;
    position: fixed;
    left: 50%;
    top: 75px;
    z-index: 998;
    transform: translateX(-50%) translateY(-750px);
    transition: transform 0.5s ease-out;
    margin: 0 auto;
}

nav.mega-menu.open {
    /* display: flex; */
    transform: translateX(-50%) translateY(0px);
}

nav.mega-menu .mega-menu-box {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
}

nav.mega-menu ul {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 15px;
    flex-wrap: wrap;
}

nav.mega-menu li {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 15px 20px;
    flex: 1 1 20%;
}

nav.mega-menu .menu-item a {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

nav.mega-menu .menu-item-title{
    font-family: var(--font-heading);
    font-weight: 400;
    font-size: 1.2rem;
    color: var(--primary-color);
    text-decoration: none;
}

nav.mega-menu .menu-item-title:hover {
    color: var(--secondary-color);
}

nav.mega-menu .menu-item-description {
    font-family: var(--font-primary);
    font-size: 0.9rem;
    color: var(--text-color);
}

nav.mega-menu .menu-item span.button-text{
    display: flex;
    font-size: 0.8rem;
    color: #aaa;
    margin: 0 0 0  auto;
    line-height: 1;
    opacity: 0;
    transform: translateX(-10px);
    transition: all 0.3s ease;
}

nav.mega-menu .menu-item:hover span.button-text {
    opacity: 1;
    color: var(--primary-color);
    transform: translateX(0);
}


/* media 768 */
@media (max-width:1024px) {
    nav.mega-menu li {
        min-width: 45%;
    }
}


@media (max-width:768px) {

    nav.mega-menu{
        width: calc(100% - 30px);
    }
    
    nav.mega-menu li {
        width: 100%;
        min-width: 100%;
    }
}




/* app canvas */


.application-interfaces-for-ai-canvas {
    margin-top: 60px;
    background: #f3f7ff;
    padding: 0;
    height: calc(100vh - 60px);
    width: 100%;
    /* Enhanced scroll behavior for cross-scrolling */
    overflow: auto;
    overflow-x: auto;
    overflow-y: auto;
    position: relative;
    /* Better scroll performance */
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    /* Ensure scrollbars are always visible for better UX */
    scrollbar-width: thin;
    /* Enhanced cross-scrolling for canvas */
    overscroll-behavior: auto;
    /* Improve scrolling performance */
    will-change: scroll-position;
    /* Better momentum scrolling on iOS */
    -webkit-overflow-scrolling: touch;
    /* Ensure content doesn't interfere with scrolling */
    touch-action: auto;
}

/* Prevent text selection during scrolling */
.application-interfaces-for-ai-canvas.scrolling {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.application-interfaces-for-ai-canvas #app {
    background-color: #fff;
    min-width: 100vw;
    min-height: 100vh;
    width: auto;
    height: auto;
    position: relative;
    z-index: 1;
    transition: width 0.3s ease, height 0.3s ease, transform 0s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Zoom effects - only applied when zoomed out */
.application-interfaces-for-ai-canvas #app.zoomed-out {
    border-radius: 20px;
    border: 1px solid #d7deed;
    box-shadow: 0 0 10px 10px #d5e0f6;
}

/* Custom SVG Arrow System Styles */
#custom-arrow-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 900;
    overflow: visible;
    display: block !important;
}

#custom-arrow-container path {
    transition: all 0.3s ease;
    cursor: pointer;
    pointer-events: stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}

#custom-arrow-container path:hover {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Arrow markers */
#custom-arrow-container marker {
    overflow: visible;
}

#custom-arrow-container marker polygon {
    transition: fill 0.2s ease;
}

/* Arrow system visibility - Enable arrows */
.application-interfaces-for-ai-canvas .arrow-line,
.application-interfaces-for-ai-canvas svg[data-arrow-line] {
    display: block !important; /* Show arrow system elements */
    z-index: 900;
    pointer-events: none;
}

/* LeaderLine arrow system */
.application-interfaces-for-ai-canvas svg[class*="leader-line"],
.application-interfaces-for-ai-canvas svg[id*="leader-line"],
.application-interfaces-for-ai-canvas div[id*="leader-line"] {
    z-index: 1 !important;
    pointer-events: none;
    display: block !important;
}

/* Force LeaderLine elements to be visible */
body > svg,
body > div[id*="leader-line"] {
    z-index: 1 !important;
    display: block !important;
}

/* Arrow canvas positioning */
.application-interfaces-for-ai-canvas #__arrowLineInternal-svg-canvas {
    display: block !important; /* Show arrow-line canvas */
    z-index: 900;
}

/* Force arrow-line elements to be positioned relative to app container */
.application-interfaces-for-ai-canvas .arrow-line,
.application-interfaces-for-ai-canvas svg[data-arrow-line] {
    position: absolute !important;
    z-index: 900;
}

/* Ensure arrows stay within the scrollable container */
.application-interfaces-for-ai-canvas *[id*="arrow"],
.application-interfaces-for-ai-canvas svg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    pointer-events: none !important;
    z-index: 2;
}

/* Smooth scrolling for better UX */
.application-interfaces-for-ai-canvas {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* iOS momentum scrolling */
}

/* Hide scrollbars but keep functionality (optional) */
.application-interfaces-for-ai-canvas::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.application-interfaces-for-ai-canvas::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.application-interfaces-for-ai-canvas::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
    transition: background 0.2s ease;
}

.application-interfaces-for-ai-canvas::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}


.begin-box {
    z-index: 999;
    overflow: hidden;
    word-wrap: break-word;
    position: fixed;
    background-color: #fcfcfc;
    border: 1px solid #e7e7e7;
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
    font-family: var(--font-primary);
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    bottom: 2vh;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 768px;
}


/* Ensure proper z-index stacking */
.application-interfaces-for-ai-canvas .canvas-item {
    z-index: 10;
    position: relative;
    border-radius: 20px;
    padding: 20px;
    box-sizing: border-box;
    font-family: var(--font-primary);
    color: var(--text-color);
    /* Remove fixed height to allow dynamic sizing */
    /* min-height: 200px; */
    height: auto;
    
    /* Touch and mobile drag support */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: none; /* Prevent default touch actions during drag */
    
    /* Better content flow */
    display: flex;
    flex-direction: column;
    /* Prevent content overflow */
    overflow: hidden;
    word-wrap: break-word;
}

.application-interfaces-for-ai-canvas .canvas-item .box-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.application-interfaces-for-ai-canvas .canvas-item:hover .box-content{
    padding-bottom: 15px;
}

.application-interfaces-for-ai-canvas .canvas-item.dragging {
    z-index: 9999;
}

/* Touch dragging visual feedback */
.canvas-item.touch-dragging {
    opacity: 0.8;
    transform: scale(1.05);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transition: none !important;
}

/* Re-enable text selection for content areas */
.canvas-item .gemini-response,
.canvas-item .form-control,
.canvas-item input,
.canvas-item textarea,
.canvas-item .box-content {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
    touch-action: auto;
}

/* Fix for arrow positioning during scroll */
.application-interfaces-for-ai-canvas svg[data-arrow-line] {
    transform: none !important;
}

/* Critical fix for arrow-line internal canvas positioning */
/* Remove global positioning to avoid conflicts */

/* Ensure arrow-line canvas follows scroll container */
.application-interfaces-for-ai-canvas {
    position: relative;
    z-index: 1;
}

/* Force arrow canvas to be contained within the scroll area and match exact dimensions */
.application-interfaces-for-ai-canvas #__arrowLineInternal-svg-canvas {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 3000px !important; /* Match #app width exactly */
    height: 3000px !important; /* Match #app height exactly */
    pointer-events: none !important;
    z-index: 2 !important;
    overflow: visible !important; /* Allow arrows to be drawn outside if needed */
    transform: none !important; /* Prevent any transforms that could misalign */
}

.canvas-text-box {
    position: absolute;
    background-color: #fcfcfc;
    border: 1px solid #e7e7e7;
    border-radius: 20px;
    padding: 20px;
    width: 280px; /* Fixed width for consistent layout */
    /* min-height: 200px;*/
    box-sizing: border-box;
    font-family: var(--font-primary);
    color: var(--text-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: grab;
    user-select: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.canvas-text-box:hover {
    background-color: #f5f9ff;
    border: 1px solid #e3ecfc;
}

/* Dragging states */
.canvas-text-box.dragging {
    cursor: grabbing !important;
    transform: rotate(2deg) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    z-index: 9999 !important;
    background-color: #f0f7ff;
    border: 2px solid var(--primary-color);
}

.canvas-text-box:active {
    cursor: grabbing;
}

/* Disable text selection while dragging */
body.dragging-active {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.canvas-text-box .canvas-title {
    font-family: var(--font-code);
    font-size: 1.2rem;
    font-weight: 400;
    color: #7f7f7f;
    margin-bottom: 10px;
}

.canvas-text-box .canvas-description {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 15px;
    letter-spacing: 0.1px;
}

.canvas-button {
    display: inline-block;
    font-size: 0.8rem;
    font-weight: 300;
    color: #a7a7a7;
    padding: 0;
    border-radius: 0;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
    line-height: 1;
}

/* Canvas Form Styles */
form.canvas-form.dynamic-tool-form {
    margin: 0 -20px;
    padding: 20px;
    background: #cedef7;
    box-shadow: inset 0 0 3px 3px #c6d9fa;
}

.dynamic-tool-form small.form-text.text-muted {
    font-size: 11px !important;
    color: #91a3be !important;
    word-wrap: inherit !important;
    width: 100% !important;
    display: block;
    font-family: 'Roboto Mono';
    margin-bottom: 30px;
}

/* Form Item Container */
.canvas-form .form-item {
    margin-bottom: 20px;
    position: relative;
}

.canvas-form .form-item:last-of-type {
    margin-bottom: 25px;
}

/* Labels */
.canvas-form .form-item label {
    display: block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #4a5568;
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Text Inputs */
.canvas-form .form-item .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.canvas-form .form-item .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #fafcff;
}

.canvas-form .form-item .form-control:hover:not(:focus) {
    border-color: #cbd5e0;
}

/* Textarea Specific */
.canvas-form .form-item textarea.form-control {
    min-height: 100px;
    resize: vertical;
    line-height: 1.5;
}

/* Select Dropdown */
.canvas-form .form-item select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 40px;
    cursor: pointer;
}



/* Checkbox and Radio Groups */
.canvas-form .form-item .form-check-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.canvas-form .form-item .form-check-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #4a5568;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: all 0.2s ease;
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    margin-right: 0 !important;
}

.canvas-form .form-item .form-check-label:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
}

.canvas-form .form-item .form-check-input {
    margin: 0;
    width: 16px;
    height: 16px;
    accent-color: var(--primary-color);
    cursor: pointer;
}

.canvas-form .form-item .form-check-label:has(.form-check-input:checked) {
    background: rgba(66, 133, 244, 0.1);
    border-color: var(--primary-color);
    color: var(--primary-color);
    font-weight: 500;
}

/* Form Description/Help Text */
.canvas-form .form-item small.form-text.text-muted {
    font-size: 0.75rem !important;
    color: #718096 !important;
    margin-top: 6px;
    margin-bottom: 0;
    line-height: 1.4;
    font-family: var(--font-primary);
}

/* Submit Button */
.canvas-form .dynamic-form-submit {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3367d6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
    margin-top: 5px;
    width: 100%;
}

.canvas-form .dynamic-form-submit:hover {
    background: linear-gradient(135deg, #3367d6 0%, #2557c7 100%);
    box-shadow: 0 4px 8px rgba(66, 133, 244, 0.3);
    transform: translateY(-1px);
}

.canvas-form .dynamic-form-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.canvas-form .dynamic-form-submit:disabled {
    background: #cbd5e0;
    color: #a0aec0;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Running state for dynamic form submit */
.canvas-form .dynamic-form-submit[data-running="true"],
.canvas-form .dynamic-form-submit:disabled[data-running="true"] {
    background: linear-gradient(135deg, #fbbc04 0%, #f9ab00 100%) !important;
    color: white !important;
    animation: pulse-running 1.5s ease-in-out infinite;
    box-shadow: 0 2px 8px rgba(251, 188, 4, 0.3) !important;
    cursor: not-allowed;
}

@keyframes pulse-running {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.9;
        transform: scale(0.98);
    }
}

/* Input States - Required Fields */
.canvas-form .form-item .form-control[required] {
    position: relative;
}

/* .canvas-form .form-item .form-control[required]:invalid {
    border-color: #f56565;
} */

/* .canvas-form .form-item .form-control[required]:invalid:focus {
    border-color: #f56565;
    box-shadow: 0 0 0 3px rgba(245, 101, 101, 0.1);
} */

/* Number Input Specific */
.canvas-form .form-item input[type="number"].form-control {
    appearance: textfield;
    -moz-appearance: textfield;
}

.canvas-form .form-item input[type="number"].form-control::-webkit-outer-spin-button,
.canvas-form .form-item input[type="number"].form-control::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Date/DateTime Input Specific */
.canvas-form .form-item input[type="date"].form-control,
.canvas-form .form-item input[type="datetime-local"].form-control,
.canvas-form .form-item input[type="time"].form-control {
    cursor: pointer;
}

/* File Input Specific */
.canvas-form .form-item input[type="file"].form-control {
    padding: 8px 12px;
    cursor: pointer;
}

.canvas-form .form-item input[type="file"].form-control::file-selector-button {
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    margin-right: 12px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s ease;
}

.canvas-form .form-item input[type="file"].form-control::file-selector-button:hover {
    background: #3367d6;
}

/* Color Input Specific */
.canvas-form .form-item input[type="color"].form-control {
    height: 45px;
    padding: 4px;
    cursor: pointer;
}

/* Range Input Specific */
.canvas-form .form-item input[type="range"].form-control {
    height: 8px;
    border-radius: 4px;
    background: #e2e8f0;
    outline: none;
    appearance: none;
    cursor: pointer;
}

.canvas-form .form-item input[type="range"].form-control::-webkit-slider-thumb {
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.canvas-form .form-item input[type="range"].form-control::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-color);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .canvas-form .form-item .form-control {
        padding: 10px 14px;
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    .canvas-form .dynamic-form-submit {
        padding: 14px 20px;
        font-size: 16px;
    }
}

.canvas-form .form-group {
    margin-bottom: 15px;
}

#generate-box-form.canvas-form .form-group{
    margin-bottom: 0;
    width: 100%;
}

.canvas-form label {
    display: block;
    font-family: var(--font-code);
    font-size: 0.75rem;
    color: #666;
    margin-bottom: 5px;
}

/* Legacy form controls - updated to work with new form-item structure */
.canvas-form .form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: var(--font-primary);
    background: #ffffff;
    transition: all 0.2s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.canvas-form .form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1), 0 1px 3px rgba(0, 0, 0, 0.1);
    background: #fafcff;
}

form#generate-box-form {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap:15px
}

.canvas-form .btn-generate {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #3367d6 100%);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
    width: fit-content;
    text-align: center;
    justify-content: center;
    line-height: 1;
    font-family: 'Varela Round';
}

/* media 768 generate-button-text display:none */

@media (max-width: 768px) {
    .generate-button-text {
        display: none;
    }

    .begin-box {
        border: none;
        width: 100%;
        border-radius: 0;
        bottom: 0;
        padding: 15px;
    }
}

.canvas-form .btn-generate .icon-small{
    transition: transform 0.3s ease;
    color: white;
}


.canvas-form .btn-generate:hover .icon-small{
    transform: rotate(90deg);
}

.canvas-form .btn-generate.loading:disabled {
    cursor: not-allowed;
    animation: background-gradient 1.5s linear infinite;
}

@keyframes background-gradient {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 100% 50%;
    }
}



/* Generate button loading state */
.canvas-form .btn-generate.loading .icon-small {
    animation: spin 1s linear infinite;
}

.canvas-form .btn-generate.loading .generate-button-text {
    opacity: 0.7;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.canvas-form .loading-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--primary-color);
    font-size: 0.85rem;
    margin-top: 10px;
}

.canvas-form .loading-indicator .material-icons {
    animation: spin 1s linear infinite;
}

/* Box removal button */
.close-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.close-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.5);
}

.close-btn .material-icons {
    color: #ef4444;
    font-size: 16px;
}

.canvas-item:hover .close-btn {
    opacity: 1;
}

button.box-lineage-btn {
    position: absolute;
    bottom: 5px;
    right: 8px;
    width: 28px;
    height: 28px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
}

.canvas-item:hover button.box-lineage-btn {
    opacity: 1;
}

/* Copy button styling */
button.box-copy-btn {
    position: absolute;
    bottom: 5px;
    right: 40px; /* Position to the left of lineage button */
    width: 28px;
    height: 28px;
    opacity: 0;
    transition: all 0.2s ease;
    z-index: 10;
    background: rgba(66, 133, 244, 0.1);
    border: 1px solid rgba(66, 133, 244, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto; /* Ensure button is clickable */
}

button.box-copy-btn:hover {
    background: rgba(66, 133, 244, 0.2);
    border-color: rgba(66, 133, 244, 0.5);
}

button.box-copy-btn .material-icons {
    color: var(--primary-color);
    font-size: 16px;
    pointer-events: none; /* Prevent icon from intercepting clicks */
}

.canvas-item:hover button.box-copy-btn {
    opacity: 1;
}

.expand-content-openner {
    padding: 5px 0;
    border: none;
    margin-bottom: 15px;
    font-size: 12px;
    background: transparent;
    font-family: 'Roboto Mono';
    color: #818181;
}

.canvas-item:hover .expand-content-openner {
    color: var(--primary-color);
    cursor: pointer;
    animation: zerotorighttozero 0.3s ease-out;
}

.canvas-item:hover .expand-content-openner:hover {
    color: var(--primary-color);
    cursor: pointer;
    animation: zerotorighttozero 0.3s ease-out;
}

@keyframes zerotorighttozero {
    0% {
        transform: translateX(0);
    }
    50% {
        transform: translateX(5px);
    }
    100% {
        transform: translateX(0);
    }
}

/* Generated box specific styles */
.generated-box {
    position: relative;
    animation: slideInFromRight 0.4s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Enhanced dragging feedback */
.canvas-item.dragging {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: rotate(1deg);
    z-index: 9999 !important;
}

.dragging-active .canvas-item:not(.dragging) {
    opacity: 0.7;
}

/* Prevent dragging on interactive elements */
.canvas-item input,
.canvas-item button,
.canvas-item textarea,
.canvas-item select,
.canvas-item a,
.canvas-item label,
.canvas-item .btn-generate,
.canvas-item .close-btn,
.canvas-item .canvas-button,
.canvas-item .form-control {
    cursor: pointer !important;
    pointer-events: auto;
}

.canvas-item input[type="text"],
.canvas-item input[type="email"],
.canvas-item input[type="password"],
.canvas-item textarea {
    cursor: text !important;
}

/* Draggable area indicator */
.canvas-item {
    cursor: grab;
}

.canvas-item:active {
    cursor: grabbing;
}

/* But override for interactive elements */
.canvas-item form,
.canvas-item .canvas-form {
    cursor: default;
}

/* Print styles */
@media print {
    .close-btn,
    .canvas-form .btn-generate,
    .position-refresh-button {
        display: none;
    }
}

/* Toast notifications */
.toast-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 300px;
    max-width: 400px;
    transform: translateX(100%);
    transition: all 0.3s ease;
    z-index: 10000;
    border-left: 4px solid #4285F4;
}

.toast-notification.show {
    transform: translateX(0);
}

.toast-notification.toast-success {
    border-left-color: #10b981;
}

.toast-notification.toast-warning {
    border-left-color: #f59e0b;
}

.toast-notification.toast-error {
    border-left-color: #ef4444;
}

.toast-notification .material-icons:first-child {
    color: #4285F4;
    font-size: 20px;
}

.toast-notification.toast-success .material-icons:first-child {
    color: #10b981;
}

.toast-notification.toast-warning .material-icons:first-child {
    color: #f59e0b;
}

.toast-notification.toast-error .material-icons:first-child {
    color: #ef4444;
}

.toast-message {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.4;
}

.toast-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    border-radius: 4px;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.05);
}

.toast-close .material-icons {
    font-size: 18px;
    color: #666;
}

/* Stack multiple toasts */
.toast-notification:nth-child(n+2) {
    top: calc(20px + (60px * var(--toast-index, 1)));
}

.canvas-text-box .canvas-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    align-items: center;
}

.canvas-text-box .canvas-actions .canvas-button {
    flex: 1;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.canvas-text-box .canvas-actions .btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.canvas-text-box .canvas-actions .btn-primary:hover {
    background-color: #3367d6;
    transform: translateY(-1px);
}

.canvas-text-box .canvas-actions .btn-danger {
    background-color: #dc3545;
    color: white;
}

.canvas-text-box .canvas-actions .btn-danger:hover {
    background-color: #c82333;
    transform: translateY(-1px);
}

.canvas-text-box .canvas-actions .icon-small {
    font-size: 16px;
}

/* Canvas item content styling for dynamic heights */
.canvas-item h5 {
    margin: 0 0 10px 0;
    font-weight: 600;
    line-height: 1.4;
    flex-shrink: 0;
}

.canvas-item p {
    margin: 0 0 15px 0;
    line-height: 1.5;
    flex-grow: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.canvas-item .canvas-button {
    margin-top: auto;
    flex-shrink: 0;
    align-self: flex-start;
}

.canvas-item .mini-generator-form {
    margin-top: 10px;
    flex-shrink: 0;
}

/* Ensure proper spacing for generator boxes */
.canvas-item.generator-box {
    min-height: 250px; /* Slightly taller for generator boxes */
}

/* Dynamic height transition for smooth resizing */
.canvas-item {
    transition: height 0.3s ease, min-height 0.3s ease;
}

/* Gemini API Modal */
.gemini-api-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
}

.gemini-api-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

.modal-content {
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    z-index: 1;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 500;
    color: #202124;
}

.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background-color: rgba(95, 99, 104, 0.1);
}

.modal-close .material-icons {
    font-size: 20px;
    color: #5f6368;
}

.modal-body {
    padding: 24px;
}

.api-status-section {
    margin-bottom: 24px;
}

.connection-status {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    border-radius: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e8eaed;
}

.status-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon .material-icons {
    font-size: 20px;
}

.connection-status.connected {
    background-color: #e8f5e8;
    border-color: #34a853;
}

.connection-status.connected .status-icon .material-icons {
    color: #34a853;
}

.connection-status.error {
    background-color: #fce8e6;
    border-color: #ea4335;
}

.connection-status.error .status-icon .material-icons {
    color: #ea4335;
}

.connection-status.testing {
    background-color: #fef7e0;
    border-color: #fbbc04;
}

.connection-status.testing .status-icon .material-icons {
    color: #fbbc04;
}

.status-text {
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.api-key-section {
    margin-bottom: 24px;
}

.api-key-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.api-key-input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.api-key-input-group input {
    width: 100%;
    padding: 12px 48px 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    background-color: white;
}

.api-key-input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.toggle-visibility {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.toggle-visibility:hover {
    background-color: rgba(95, 99, 104, 0.1);
}

.toggle-visibility .material-icons {
    font-size: 18px;
    color: #5f6368;
}

.help-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #5f6368;
}

.help-text a {
    color: var(--primary-color);
    text-decoration: none;
}

.help-text a:hover {
    text-decoration: underline;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.modal-actions button {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.btn-secondary:hover {
    background-color: #f1f3f4;
    border-color: #c4c7c5;
}

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

.btn-primary:hover {
    background-color: #3367d6;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.3);
}

.btn-primary:disabled {
    background-color: #dadce0;
    color: #9aa0a6;
    cursor: not-allowed;
}

.modal-actions .material-icons {
    font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        animation: modalSlideInMobile 0.3s ease-out;
    }
    
    .modal-content-wide {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    .modal-actions {
        flex-direction: column;
        padding: 16px;
        border-top: 1px solid #e8eaed;
        margin-top: auto;
        background: white;
        position: sticky;
        bottom: 0;
    }
    
    .modal-actions button {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
        font-size: 16px;
    }
    
    /* Mobile animation */
    @keyframes modalSlideInMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Gemini Box Styles */
.gemini-box {
    /* border-left: 4px solid var(--primary-color); */
    border: 1px solid #edeffa;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.gemini-box .box-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
    gap: 10px;
}

.gemini-box .box-title {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    line-height: 1.4;
    flex: 1;
}

.gemini-box .box-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.gemini-box .box-actions button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gemini-box .box-actions button:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.gemini-box .box-actions .material-icons {
    font-size: 16px;
    color: #666;
}

.gemini-response {
    font-size: 13px;
    line-height: 1.5;
    color: #444;
    position: relative;
    /* Allow text selection without triggering drag */
    user-select: text;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    /* Prevent drag start on text selection */
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    cursor: initial;
}


.gemini-response p {
    margin: 0;
}

.suggestion-buttons {
    margin-bottom: 12px;
}

.suggestions-label {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: #666;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.suggestion-btn {
    display: inline-block;
    background: #f1f3f4;
    border: 1px solid #dadce0;
    border-radius: 16px;
    padding: 4px 12px;
    font-size: 12px;
    color: #3c4043;
    cursor: pointer;
    margin: 2px 4px 2px 0;
    transition: all 0.2s ease;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.suggestion-btn:hover {
    background: #e8eaed;
    border-color: #c4c7c5;
}

.suggestion-btn:active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.suggestion-btn.processing {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    cursor: not-allowed;
    opacity: 0.8;
    position: relative;
}

.suggestion-btn.processing .suggestion-loader {
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    border-top: 1.5px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.suggestion-btn.processing .suggestion-text {
    opacity: 0.8;
}

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

.custom-prompt-section {
    display: flex;
    gap: 8px;
    align-items: center;
}

.custom-prompt-input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #dadce0;
    border-radius: 16px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.custom-prompt-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.send-prompt-btn {
    background: var(--primary-color);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.send-prompt-btn:hover {
    background: #3367d6;
}

.send-prompt-btn .material-icons {
    font-size: 16px;
    color: white;
}

.send-prompt-btn:disabled {
    background: #dadce0;
    cursor: not-allowed;
}

.send-prompt-btn.processing .material-icons {
    animation: pulse 1.5s ease-in-out infinite;
}

.send-prompt-btn.processing {
    background: #fbbc04; /* Yellow color during processing */
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(0.9);
    }
}

/* Expanded content modal */
.content-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.content-modal.active {
    display: flex;
}

.content-modal-inner {
    background: white;
    border-radius: 12px;
    padding: 24px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

.content-modal-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
}

.content-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.content-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.content-modal-body {
    font-size: 14px;
    line-height: 1.6;
    color: #444;
    white-space: pre-wrap;
}

/* Loading states */
.gemini-box.loading {
    opacity: 0.7;
    pointer-events: none;
}

.gemini-box.loading .box-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Content Modal Mobile Responsive */
@media (max-width: 768px) {
    .content-modal {
        padding: 0;
    }
    
    .content-modal-inner {
        width: 100%;
        height: 100vh;
        max-height: 100vh;
        max-width: 100%;
        margin: 0;
        border-radius: 0;
        border: none;
        padding: 0;
        display: flex;
        flex-direction: column;
        animation: modalSlideInMobile 0.3s ease-out;
    }
    
    .content-modal-header {
        padding: 16px;
        margin-bottom: 0;
        border-bottom: 1px solid #e8eaed;
        background: white;
        position: sticky;
        top: 0;
        z-index: 10;
    }
    
    .content-modal-body {
        padding: 16px;
        flex: 1;
        overflow-y: auto;
    }
    
    /* Mobile animation */
    @keyframes modalSlideInMobile {
        from {
            opacity: 0;
            transform: translateY(100%);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
}

/* Gemini Starter Box Styles */
.gemini-starter {
    border-left: 4px solid #4285f4;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.1);
}

.gemini-starter .box-header .box-title {
    display: flex;
    align-items: center;
    color: #1a73e8;
    font-weight: 600;
}

.starter-prompts {
    margin-bottom: 12px;
}

.starter-prompt-btn {
    display: block;
    width: 100%;
    text-align: left;
    background: #f8f9fa;
    border: 1px solid #e8eaed;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    color: #3c4043;
    cursor: pointer;
    margin-bottom: 6px;
    transition: all 0.2s ease;
}

.starter-prompt-btn:hover {
    background: #e8f0fe;
    border-color: #4285f4;
    color: #1a73e8;
}

.starter-prompt-btn:last-child {
    margin-bottom: 0;
}

.custom-starter-section {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e8eaed;
}

.custom-starter-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 20px;
    font-size: 12px;
    outline: none;
    transition: border-color 0.2s ease;
}

.custom-starter-input:focus {
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.1);
}

.start-conversation-btn {
    background: #4285f4;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.start-conversation-btn:hover {
    background: #3367d6;
}

.start-conversation-btn .material-icons {
    font-size: 16px;
    color: white;
}

/* Loading Box Styles */
.loading-box {
    background: #f8f9fa;
    border: 1px dashed #dadce0;
    border-radius: 8px;
    text-align: center;
    padding: 20px;
}

.loading-spinner {
    margin-bottom: 10px;
}

.loading-spinner .material-icons {
    font-size: 24px;
    color: #4285f4;
    animation: spin 1s linear infinite;
}

/* Modern Alert System Styles */
.iforai-alert {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.iforai-alert.iforai-alert-show {
    opacity: 1;
    visibility: visible;
}

.iforai-alert-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.iforai-alert-container {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    overflow: hidden;
    transform: scale(0.8) translateY(-20px);
    transition: all 0.3s ease;
}

.iforai-alert-show .iforai-alert-container {
    transform: scale(1) translateY(0);
}

.iforai-alert-header {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 24px 24px 16px;
    border-bottom: 1px solid #f1f5f9;
}

.iforai-alert-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.1);
    flex-shrink: 0;
}

.iforai-alert-icon .material-icons {
    font-size: 24px;
}

.iforai-alert-title {
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
    line-height: 1.4;
}

.iforai-alert-content {
    padding: 16px 24px 24px;
}

.iforai-alert-message {
    font-size: 15px;
    line-height: 1.6;
    color: #4b5563;
    margin: 0;
}

.iforai-alert-buttons {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 0 24px 24px;
}

.iforai-alert-btn {
    padding: 12px 24px;
    border-radius: 8px;
    border: 1px solid #d1d5db;
    background: #f9fafb;
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.iforai-alert-btn:hover {
    background: #f3f4f6;
    border-color: #9ca3af;
}

.iforai-alert-confirm {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

.iforai-alert-confirm:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.iforai-alert-cancel:hover {
    background: #e5e7eb !important;
}

/* Animation for success alerts */
.iforai-alert .iforai-alert-icon[style*="#10b981"] {
    background: rgba(16, 185, 129, 0.1) !important;
}

/* Animation for error alerts */
.iforai-alert .iforai-alert-icon[style*="#ef4444"] {
    background: rgba(239, 68, 68, 0.1) !important;
}

/* Animation for warning alerts */
.iforai-alert .iforai-alert-icon[style*="#f59e0b"] {
    background: rgba(245, 158, 11, 0.1) !important;
}

/* Animation for question alerts */
.iforai-alert .iforai-alert-icon[style*="#8b5cf6"] {
    background: rgba(139, 92, 246, 0.1) !important;
}

/* Responsive */
@media (max-width: 640px) {
    .iforai-alert-container {
        width: 95%;
        margin: 16px;
    }
    
    .iforai-alert-header {
        padding: 20px 20px 12px;
        gap: 12px;
    }
    
    .iforai-alert-icon {
        width: 40px;
        height: 40px;
    }
    
    .iforai-alert-icon .material-icons {
        font-size: 20px;
    }
    
    .iforai-alert-title {
        font-size: 18px;
    }
    
    .iforai-alert-content {
        padding: 12px 20px 20px;
    }
    
    .iforai-alert-buttons {
        padding: 0 20px 20px;
        flex-direction: column;
    }
    
    .iforai-alert-btn {
        width: 100%;
    }
}

/* Notification style (no title) */
.iforai-alert-header:has(.iforai-alert-title:empty) {
    padding: 20px 24px;
    border-bottom: none;
}

.iforai-alert-header:has(.iforai-alert-title:empty) + .iforai-alert-content {
    padding-top: 0;
}


/* Zoom feedback animation */
#zoom-feedback {
    animation: zoomFeedback 1s ease-out;
}

@keyframes zoomFeedback {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }
    20% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1.1);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}



/* Prevent text selection during zoom operations */
.application-interfaces-for-ai-canvas.zooming {
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Improve zoom control accessibility */
.zoom-btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.zoom-btn:focus:not(:focus-visible) {
    outline: none;
}

.zoom-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.zoom-btn:disabled:hover {
    background: none;
    color: #5f6368;
}

@media (max-width:768px) {
    a.site-logo img{
        height: 15px;
    }

    .gemini-api-button {
        position: relative;
        transition: background-color 0.2s ease;
        padding: 10px;
        width: 35px;
        height: 35px;
    }

    button.first-menu-open-button svg {
        fill: #fff;
        width: 50px;
    }
}


/* Model Selection Section */
.model-selection-section {
    margin-bottom: 24px;
}

.model-selection-section label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #202124;
}

.model-select-group {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.model-select {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #dadce0;
    border-radius: 8px;
    font-size: 14px;
    background-color: white;
    cursor: pointer;
    transition: border-color 0.2s ease;
    max-width: calc(100% - 55px)
}

.model-select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
}

.model-select option {
    padding: 8px;
    font-size: 14px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.model-select option:disabled {
    color: #666;
    font-style: italic;
    background-color: #f8f9fa;
}

.refresh-models {
    background: none;
    border: 1px solid #dadce0;
    cursor: pointer;
    padding: 10px;
    border-radius: 8px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 44px;
}

.refresh-models:hover {
    background-color: #f8f9fa;
    border-color: #c4c7c5;
}

.refresh-models:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.refresh-models .material-icons {
    font-size: 18px;
    color: #5f6368;
}

.model-info {
    margin-top: 8px;
    font-size: 12px;
    color: #5f6368;
    line-height: 1.4;
}

/* Responsive */
@media (max-width: 768px) {
    .modal-content {
        
    }
    
    .modal-header,
    .modal-body {
        padding: 16px;
    }
    
    .modal-actions {
        flex-direction: column;
    }
    
    .modal-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .model-select-group {
        flex-direction: column;
        gap: 12px;
    }
    
    .refresh-models {
        width: 100%;
        min-width: unset;
    }
}

small#modelDescription {
    font-family: 'Roboto Mono';
    font-size: 12px;
    margin-top: 10px;
    display: block;
}

/* ========================= LEARN MODAL CONTENT STYLES ========================= */

/* Learn Modal Main Content Container */
.iforai-learn-content {
    max-width: 100%;
    font-family: var(--font-primary);
    line-height: 1.7;
    color: #374151;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 12px 0;
    margin-bottom: 12px;
    border-bottom: 1px solid #f3f4f6;
}

.hero-section h1 {
    font-size: 30px;
    font-weight: 700;
    color: #0366cc;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: 'Roboto Mono';
}

.hero-subtitle {
    font-size: 20px;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 400;
}

.problem-section h2 {
    font-size: 18px;
    font-weight: 700;
    color: #169829;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: 'Roboto Mono';
    text-align: center;
}

.problem-section p{
    font-size: 14px;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    margin-bottom: 24px;
}

.concept-section h2{
    font-size: 18px;
    font-weight: 700;
    color: #d73a49;
    margin-bottom: 16px;
    line-height: 1.2;
    font-family: 'Roboto Mono';
    text-align: center;
}

.concept-section p {
    font-size: 14px;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    margin-bottom: 24px;
}

/* Features Section */
.features-section {
    margin-bottom: 48px;
}

.features-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #211f8d;
    margin-bottom: 0;
    line-height: 1.3;
    text-align: center;
    margin-top: 36px;
    font-family: 'Roboto Mono';
}

/* Feature List - styled like benefits grid */
.feature-list {
    display: flex;
    gap: 12px;
    margin-top: 32px;
    flex-direction: column;
}

.feature-item {
    padding: 32px 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: left;
    transition: all 0.3s ease;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}

.feature-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.feature-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

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

/* Benefits Section */
.benefits-section {
    margin-bottom: 48px;
}

.benefits-section h2 {
    font-size: 24px;
    font-weight: 700;
    color: #211f8d;
    margin-bottom: 0;
    line-height: 1.3;
    text-align: center;
    margin-top: 36px;
    font-family: 'Roboto Mono';
}

/* Benefits Grid */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 32px;
}

.benefit-item {
    padding: 32px 24px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    text-align: left;
    transition: all 0.3s ease;
}

.benefit-item:hover {
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.15);
}

.benefit-icon {
    font-size: 24px;
    margin-bottom: 16px;
    display: block;
}

.benefit-item h4 {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

.benefit-item p {
    font-size: 15px;
    color: #6b7280;
    margin: 0;
    line-height: 1.6;
}

/* Technology Section - styled like benefits */
.technology-section {
    margin-bottom: 48px;
    padding: 32px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.technology-section h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.technology-section p {
    font-size: 16px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.6;
}

.tech-highlights {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

.tech-item {
    padding: 16px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    line-height: 1.5;
}

.tech-item strong {
    color: #111827;
    font-weight: 600;
}

/* Learn Footer */
.learn-footer {
    text-align: center;
    padding: 48px 0;
    margin-top: 48px;
    border-top: 1px solid #f3f4f6;
}

.call-to-action {
    background: #f9fafb;
    border-radius: 12px;
    padding: 32px;
    margin-top: 32px;
}

.call-to-action h3 {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.call-to-action p {
    font-size: 16px;
    line-height: 1.6;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
}

/* === CTA Section for Non-Logged Users === */
.auth-cta-section {
    background: linear-gradient(135deg, #3367d6 0%, #4483f2 100%);
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    margin: 48px 0;
    border: none;
}


.auth-cta-section h3 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 16px;
    line-height: 1.3;
}

.auth-cta-section p {
    font-size: 18px;
    color: #fff;
    margin-bottom: 32px;
    line-height: 1.6;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.auth-cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.auth-cta-btn {
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    min-width: 160px;
    justify-content: center;
}

.auth-cta-btn-primary {
    background: var(--primary-color);
    color: white;
}

.auth-cta-btn-primary:hover {
    background: #3367d6;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(66, 133, 244, 0.3);
    color: white;
    text-decoration: none;
}

.auth-cta-btn-secondary {
    background: white;
    color: #374151;
    border: 2px solid #d1d5db;
}

.auth-cta-btn-secondary:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    transform: translateY(-2px);
    color: #374151;
    text-decoration: none;
}

@media (max-width: 768px) {
    .auth-cta-section {
        padding: 32px 24px;
        margin: 32px 0;
    }
    
    .auth-cta-section h3 {
        font-size: 24px;
    }
    
    .auth-cta-section p {
        font-size: 16px;
    }
    
    .auth-cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .auth-cta-btn {
        width: 100%;
        max-width: 280px;
    }
}

/* Disabled Menu Items & Coming Soon Badge */
nav.mega-menu .menu-item-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
    position: relative;
}

nav.mega-menu .menu-item-disabled .menu-item-title,
nav.mega-menu .menu-item-disabled .menu-item-description,
nav.mega-menu .menu-item-disabled .button-text {
    color: #6c757d !important;
}

nav.mega-menu .menu-item-disabled .button-text {
    background: #e9ecef;
}

.coming-soon-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #ffc107;
    color: #000;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

/* Development Notice (Learn Modal) */
.development-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.development-notice p {
    margin: 0;
    color: #856404;
    font-size: 14px;
}

.development-notice a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
}

.development-notice a:hover {
    text-decoration: underline;
}

/* ========================= PROTOCOL AGREEMENT STYLES ========================= */

/* Register Step Management */
.register-step {
    display: none;
}

.register-step.active {
    display: block;
    animation: fadeInSlide 0.3s ease-out;
}

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

/* Step Header */
.step-header {
    margin-bottom: 24px;
    text-align: center;
}

.step-header h3 {
    margin: 0 0 8px 0;
    color: #1a73e8;
    font-size: 20px;
    font-weight: 600;
}

.step-description {
    margin: 0;
    color: #5f6368;
    font-size: 14px;
    line-height: 1.4;
}

/* Protocol Content */
.protocol-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.protocol-scroll-area {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 20px;
    background-color: #fafafa;
    scrollbar-width: thin;
    scrollbar-color: #dadce0 transparent;
}

.protocol-scroll-area::-webkit-scrollbar {
    width: 6px;
}

.protocol-scroll-area::-webkit-scrollbar-track {
    background: transparent;
}

.protocol-scroll-area::-webkit-scrollbar-thumb {
    background: #dadce0;
    border-radius: 3px;
}

.protocol-scroll-area::-webkit-scrollbar-thumb:hover {
    background: #bdc1c6;
}

/* Protocol Text Styling */
.protocol-text {
    line-height: 1.6;
    color: #3c4043;
}

.protocol-text h2 {
    color: #1a73e8;
    font-size: 18px;
    margin: 0 0 16px 0;
    font-weight: 600;
}

.protocol-text h3 {
    color: #1a73e8;
    font-size: 16px;
    margin: 20px 0 12px 0;
    font-weight: 600;
}

.protocol-text h4 {
    color: #1a73e8;
    font-size: 14px;
    margin: 16px 0 8px 0;
    font-weight: 600;
}

.protocol-text h5 {
    color: #5f6368;
    font-size: 13px;
    margin: 12px 0 6px 0;
    font-weight: 600;
}

.protocol-text p {
    margin: 0 0 12px 0;
    font-size: 13px;
}

.protocol-text ul {
    margin: 0 0 12px 0;
    padding-left: 20px;
}

.protocol-text li {
    margin-bottom: 6px;
    font-size: 13px;
}

.protocol-text a {
    color: #1a73e8;
    text-decoration: none;
}

.protocol-text a:hover {
    text-decoration: underline;
}

.protocol-text strong {
    font-weight: 600;
    color: #202124;
}

/* Protocol Agreement Checkbox */
.protocol-agreement {
    background-color: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 16px;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
    position: relative;
}

.checkbox-container input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #dadce0;
    border-radius: 4px;
    position: relative;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.checkbox-container:hover .checkmark {
    border-color: #1a73e8;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #1a73e8;
    border-color: #1a73e8;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.agreement-text {
    font-size: 13px;
    line-height: 1.5;
    color: #3c4043;
}

/* Step Actions */
.step-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 20px;
}

.step-actions button {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    min-width: 100px;
}

.step-actions button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.step-actions .btn-primary {
    background-color: #1a73e8;
    color: white;
}

.step-actions .btn-primary:hover:not(:disabled) {
    background-color: #1557b0;
}

.step-actions .btn-secondary {
    background-color: #f8f9fa;
    color: #3c4043;
    border: 1px solid #dadce0;
}

.step-actions .btn-secondary:hover {
    background-color: #f1f3f4;
}

/* Responsive Design */
@media (max-width: 768px) {
    .protocol-scroll-area {
        max-height: 300px;
        padding: 16px;
    }
    
    .protocol-text h2 {
        font-size: 16px;
    }
    
    .protocol-text h3 {
        font-size: 15px;
    }
    
    .protocol-text h4 {
        font-size: 14px;
    }
    
    .step-actions {
        flex-direction: column;
    }
    
    .step-actions button {
        width: 100%;
    }
}