/* Tab interface */
.tab-container {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 20px;
}

.tab-button {
    padding: 10px 20px;
    background-color: #f5f5f5;
    border: none;
    border-radius: 4px 4px 0 0;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-right: 5px;
}

.tab-button:hover {
    background-color: #e0e0e0;
}

.tab-button.active {
    background-color: #3498db;
    color: white;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* Buttons */
button {
    padding: 8px 15px;
    background-color: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

button:hover {
    background-color: #2980b9;
}

.primary-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
}

.secondary-button {
    padding: 8px 15px;
    font-size: 14px;
    font-weight: normal;
}

.icon-only {
    padding: 0;
    width: 32px;
    height: 32px;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
}

.green-button {
    background-color: #27ae60 !important;
    color: white !important;
}

.green-button:hover {
    background-color: #219653 !important;
}

.blue-button {
    background-color: #4a90e2 !important;
    color: white !important;
}

.blue-button:hover {
    background-color: #357abd !important;
}

.red-button {
    background-color: #e74c3c !important;
    color: white !important;
}

.red-button:hover {
    background-color: #c0392b !important;
}

.gray-button {
    background-color: #7f8c8d !important;
    color: white !important;
}

.gray-button:hover {
    background-color: #6c7a7a !important;
}

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #eee;
    border-radius: 10px;
    margin: 20px 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #27ae60;
    width: 0%;
    transition: width 0.3s ease;
}

#progress-text {
    text-align: center;
    font-weight: 600;
}

.download-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    margin-top: 10px;
}

.download-button:hover {
    background-color: #2980b9;
}

/* Collapsible sections */
.collapsible-section {
    margin-bottom: 8px;
    border: 1px solid #eee;
    border-radius: 4px;
    overflow: hidden;
}

.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: #f0f0f0;
    cursor: pointer;
    font-weight: bold;
    -webkit-user-select: none;
    user-select: none;
}

.collapsible-header h4 {
    margin: 0;
}

.toggle-icon,
.theme-toggle-icon {
    transition: transform 0.3s ease;
}

.collapsible-section.open .toggle-icon {
    transform: rotate(180deg);
}

.collapsible-content {
    padding: 10px;
    display: none;
    background-color: white;
}

.collapsible-section.open .collapsible-content {
    display: block;
}

.collapsible-section.open .collapsible-header {
    border-bottom: 1px solid #ddd;
}

/* Common form utilities */
.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.form-group.half {
    flex: 1;
}

.checkbox-label {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    color: #555;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.checkbox-label input {
    margin-right: 8px;
    cursor: pointer;
    width: auto !important;
}

.inline-checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.inline-checkbox-group input[type="number"] {
    width: 60px !important;
    padding: 4px;
}

/* File input with plus button UI */
.file-input-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.file-select-btn {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #27ae60;
    border-radius: 4px;
    border: none;
    font-size: 18px;
    line-height: 1;
    color: white;
    transition: background 0.2s;
    flex-shrink: 0;
}

.file-select-btn:hover {
    background: #219653;
}

.file-name-display {
    font-size: 14px;
    color: #666;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.gap-10 {
    gap: 10px;
}

.width-full {
    width: 100%;
}

.text-start {
    text-align: start;
}

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

.text-end {
    text-align: end;
}

.margin-top-10 {
    margin-top: 10px;
}

.margin-top-5 {
    margin-top: 5px;
}

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

.margin-bottom-5 {
    margin-bottom: 5px;
}

.margin-left-10 {
    margin-left: 10px;
}

.margin-left-20 {
    margin-left: 20px;
}

.margin-right-5 {
    margin-right: 5px;
}

.margin-right-8 {
    margin-right: 8px;
}

.padding-8 {
    padding: 8px;
}

.padding-2-5 {
    padding: 2px 5px;
}

.padding-2-10 {
    padding: 2px 10px;
}

.font-mono {
    font-family: monospace;
}

.font-small {
    font-size: 0.9em;
}

.badge-recommend {
    font-size: 0.8em;
    background: #ff5722;
    color: white;
    padding: 2px 5px;
    border-radius: 3px;
    margin-left: 5px;
}

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

.flex-1-min-120 {
    flex: 1;
    min-width: 120px;
}

.flex-center {
    display: flex;
    align-items: center;
}

.display-contents {
    display: contents;
}

.flex-center-gap-5 {
    display: flex;
    align-items: center;
    gap: 5px;
}

.flex-center-gap-10 {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-label-check {
    font-size: 0.9em;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.pin-button-custom {
    padding: 2px 6px !important;
    font-size: 1em !important;
    line-height: 1 !important;
    min-width: 32px;
    height: 30px;
}

.timeline-placeholder-custom {
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    border: 1px dashed #ccc;
}

.flex-gap-10 {
    display: flex;
    gap: 10px;
}

.flex-1 {
    flex: 1;
}

.separator-top {
    margin-top: 15px;
    border-top: 1px solid #444;
    padding-top: 10px;
}

.checkbox-label-no-select {
    display: flex;
    align-items: center;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.width-auto-margin-right-8 {
    width: auto !important;
    margin-right: 8px;
}

.custom-style-container {
    background: #2a2a2a;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-size: 0.9em;
}

.color-picker-small {
    height: 30px;
    width: 40px;
    padding: 0;
}

.auto-save-label {
    display: flex;
    align-items: center;
    margin-right: 10px;
    font-size: 0.9em;
}