/*
bounding-box-drawer.css
*/
 /*font-styling*/

.montserrat-header {
  font-optical-sizing: auto;
  font-style: normal;
  color: blue;
  font-size:48px;

}

.dm-serif-text-regular {
  font-family: "DM Serif Text", serif;
  font-weight: 400;
  font-style: normal;
  font-size: 60px;
}

.gradient-text {
font-weight: 700;
color: #2d3748;
margin-bottom: 12px;
background: linear-gradient(135deg, #667eea, #764ba2);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
background-clip: text;
}

h3 {
  font-family: "Montserrat", sans-serif;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  color: blue;
  font-size:24px;
}

/*progress bar styling*/
.progress-container {
    width: 100%;
    height: 10px;
    background-color: #f0f0f0;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
    /*border:  1px solid grey;*/
    display: none;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(135deg, 
                #667eea 0%, 
                #764ba2 25%,
                #667eea 50%,
                #764ba2 75%,
                #667eea 100%
            );
    transition: width 0.3s ease;
}

/* Container to hold both elements side by side */
.canvas-and-box-container {
    display: block;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px; /* Space between the canvas and box list */
    width: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 
              0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
    margin: auto;
    padding-bottom: 1px;
}

.canvas-container {
    position: relative;
    height: fit-content;
    line-height: 0;
}

#imageCanvas {
    cursor: crosshair ;
}
.box-list {
    /*margin-top: 20px;*/
    width: 100%;
}
.box-item {
    margin: 5px 0;
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-left: 20%;
    width: 60%;
    margin: 10px auto 10px auto;
}
.delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
}
.delete-btn:hover {
    background-color: #cc0000;
}
.instructions {
    margin: 20px 0;
    padding: 15px;
    border-radius: 4px;
}
.tooltip {
    position: fixed;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    pointer-events: none;
    display: none;
    transform: translate(-50%, -100%);
    margin-top: -2px;
}

.control-panel {
    /*display: flex;*/
    display: inline-block;
    flex-direction: column;
    gap: 12px;
    background-color: white;
    padding: 15px;
    max-width: 400px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 
              0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;    

    margin: 20px auto;
}

#languageDropdown {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: white;
    width: 70%;
    box-sizing: border-box;
}

#send-btn {
    padding: 8px 16px;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    width: 100%;
    max-width: 200px;
    box-sizing: border-box;
    cursor: not-allowed;
}

#send-btn:hover {
    background-color: #3367d6;
}

button#send-btn.disabled {
    background: darkgray !important;
}

/* Blue-Green Diagonal Shimmer */
.blue-green-shimmer-button {
            background: linear-gradient(135deg, 
                #667eea 0%, 
                #764ba2 25%,
                #667eea 50%,
                #764ba2 75%,
                #667eea 100%
            );
            background-size: 300% 300%;
            animation: diagonal-shimmer 2.5s infinite;
            color: white;
            border: none;
            padding: 15px 30px;
            border-radius: 12px;
            font-size: 1rem;
            /*font-weight: bold;*/
            cursor: pointer;
            transition: transform 0.2s, box-shadow 0.3s;
            /*box-shadow: 0 4px 15px rgba(0,102,255,0.3);*/
}

@keyframes diagonal-shimmer {
            0% { background-position: 0% 0%; }
            50% { background-position: 100% 100%; }
            100% { background-position: 0% 0%; }
}

.form-group {
    flex-direction: column;
    gap: 4px;
}

.form-group label {
    font-size: 14px;
    color: #555;
    margin-bottom: 2px;
    margin-right: 2%;
}

.checkbox-container {
    display: flex;
    align-items: center;
    font-size: 14px;
    margin: 10px;
}

#isContentAwareFill {
    margin-right: 6px;
}

.select-file-btn {
    width: 200px;
    position: relative;
    overflow: hidden;
    margin-bottom: 4px;
    display: inline-block;
}
    
.select-file-btn input[type="file"] {
    width: 100%;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    height: 100%;
    cursor: pointer;
    z-index: 1;
}

.custom-file-upload {
    display: block;
    /*background-color: #f0f0f0;*/
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px 16px;
    text-align: center;
    font-size: 14px;
    color: white !important;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
  }

.custom-file-upload.file-selected {
    background: #9e9e9e; /* Grey when file is selected */
}

/* 
overlay-image-edit-style.css
*/
body {
/*    font-family: Arial, sans-serif;*/
    font-family: Noto Sans, sans-serif;
    /*max-width: 1200px;*/
    margin: 0 auto;
    /*padding: 20px;*/
    background-color: #f5f5f5;
}
h1 {
    text-align: center;
    color: #333;
}

.logo {
    height: 100px;
}

.container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: center;
}
.upload-section {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.json-input {
    width: 100%;
    min-height: 100px;
    margin-top: 10px;
    font-family: monospace;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}
.translation-textarea {
    width: 92.5%;
    min-height: 60px;
    margin-top: 5px;
    font-family: 'Noto Sans JP', sans-serif;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
}
.image-container {
    position: relative;
    /*margin-top: 20px;*/
    background-color: white;
    padding: 20px;
    /*border-radius: 10px;*/
    /*box-shadow: 0 2px 4px rgba(0,0,0,0.1);*/
    /*border: 2px solid grey;*/
    overflow: hidden;
    width: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1), 
              0 10px 20px rgba(0, 0, 0, 0.05);
    border-radius: 8px;
}
.image-wrapper {
    position: relative;
    display: inline-block;
    margin-right: 20px;
}
#imagePreview {
    max-width: 100%;
    height: auto;
    display: block;
}
.translation-box {
    position: absolute;
    border: 2px solid rgba(255, 0, 0, 0.5);
    white-space: pre; /* Only break at explicit newlines */
    overflow: visible; /* Allow text to overflow */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: bold;
    cursor: move; /* Show move cursor */
    user-select: none; /* Prevent text selection during drag */
    transform-origin: center center; /* Set rotation origin to center */
}
.box-label {
    position: absolute;
    background-color: rgba(255, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    font-size: 12px;
    border-radius: 4px;
    top: -20px;
    left: 0;
}
.original-text-container {
    display: inline-block;
    vertical-align: top;
    max-width: 300px;
}
.original-text-item {
    background-color: #f9f9f9;
    padding: 10px;
    /*margin-bottom: 10px;*/
    /*border-radius: 4px;*/
    border-left: 4px solid #333;
}
.alignment-controls {
    margin-top: 10px;
    display: flex;
    gap: 5px;
}
.font-size-control, .rotation-control, .font-weight-control, .reset-btn {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.font-size-slider, .rotation-slider, .font-weight-slider{
    flex-grow: 1;
    accent-color: #6d67c4;
}
.font-size-value, .rotation-value, .font-weight-value {
    min-width: 30px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.font-style-control, .font-color-control {
    margin-top: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.font-style-select, .color-picker {
    flex-grow: 1;
}
/*
.original-control-group {
    border-top: 1px solid #eee;
    padding-top: 10px;
}
*/
.control-group {
    border-top: 1px solid #eee;
    padding-top: 10px;
    margin-top: 10px;
}
.control-group-label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
.align-btn {
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.align-btn.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}
.align-btn:hover:not(.active) {
    background-color: #e0e0e0;
}
.button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 10px;
}
.button:hover {
    background-color: #45a049;
}
.button.download {
    /*background-color: #2196F3;*/
    /*background-color: #4285f4;*/
    /*margin-left: 10px;*/
}
.button.download:hover {
    background-color: #0b7dda;
}
.hidden {
    display: none;
}
.error {
    color: red;
    margin-top: 10px;
}

.section {
    display: none;
    margin: 20px 0;
}
.section.active {
    display: block;
}

.collapsible-container {
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsible-header {
    background-color: #f5f5f5;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.collapsible-title {
    font-weight: bold;
    margin: 0;
}

.collapsible-arrow {
    transition: transform 0.3s ease;
    font-size: 20px;
}

.collapsible-content {
/*    padding: 0 15px;
    max-height: 200px;*/
    overflow: hidden;
    transition: all 0.3s ease;
}

.collapsed .collapsible-content {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.collapsed .collapsible-arrow {
    transform: rotate(-90deg);
}

#downloadButton {
    display: block;
    min-width: 200px;
    margin: 20px auto 0 auto; /* Sets top margin and auto side margins for centering */
}


/*section1/2 nav button styling*/
.nav-buttons{
    margin-top: 20px;

}
.nav-buttons > .active-section {
    font-family: Noto Sans, sans-serif;
    color: gray;
    /*background-color:#232b2b;*/
    background: none;
    border-radius: 5px;
    cursor:  pointer;
    border:  none;
}

.nav-buttons > button {
    font-family: Noto Sans, sans-serif;
    color: lightgray;
    /*background-color: lightgray;*/
    background: none;
    border-radius: 5px;
    border:  none;
    cursor:  pointer;
    border-color: darkgray;
}

.info-text {
            background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
            border: 1px solid #bbdefb;
            border-radius: 12px;
            padding: 16px 20px;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
            font-size: 14px;
            line-height: 1.5;
            color: #2c3e50;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
            position: relative;
            overflow: hidden;
            padding-left: 48px; /* Space for the icon */
            transition: all 0.2s ease;
            text-align: left;
            display: block;
            width: auto;
            max-width: 350px;
            margin: 10px auto 20px auto;
}

.info-text::before {
    content: "💡";
    position: absolute;
    top: 16px;
    left: 16px;
    font-size: 18px;
    opacity: 0.7;
}

.info-text strong {
    color: #1976d2;
    font-weight: 600;
}

/* Subtle animation on hover */
.info-text:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
    cursor: help;
}

/* Optional: Add a subtle border accent */
.info-text::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #2196f3, #9c27b0);
    border-radius: 2px 0 0 2px;
}