/* Google Drive Upload Component Styles */

.gkss-drive-uploader {
    border: 2px dashed #b5b5b5;
    border-radius: 6px;
    background-color: #f9f9f9;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    margin-bottom: 10px;
}

.gkss-drive-uploader:hover,
.gkss-drive-uploader.is-dragover {
    border-color: #0073aa;
    background-color: #eef7fb;
}

.gkss-drive-icon {
    font-size: 48px;
    color: #0073aa;
    margin-bottom: 10px;
    display: inline-block;
}

/* Use SVG or FontAwesome if available, otherwise just text/shape */
.gkss-drive-icon svg {
    width: 48px;
    height: 48px;
    fill: currentColor;
}

.gkss-drive-text {
    font-size: 14px;
    color: #555;
    margin-bottom: 15px;
}

.gkss-drive-text strong {
    color: #333;
}

.gkss-upload-button {
    display: inline-block;
    padding: 8px 20px;
    background-color: #fff;
    border: 1px solid #0073aa;
    color: #0073aa;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: background-color 0.2s;
}

.gkss-upload-button:hover {
    background-color: #0073aa;
    color: #fff;
}

.gkss-upload-button.disabled {
    opacity: 0.6;
    pointer-events: none;
}

/* File List & Progress */
.gkss-file-list {
    margin-top: 20px;
    text-align: left;
}

.gkss-file-item {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
    margin-bottom: 8px;
    display: flex;
    flex-direction: column;
}

.gkss-file-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.gkss-file-name {
    font-weight: bold;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.gkss-file-name.is-editable {
    cursor: pointer;
    border-bottom: 1px dashed transparent;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.gkss-file-name.is-editable:hover {
    color: #0073aa;
    border-bottom-color: #0073aa;
}

.gkss-file-name-edit-icon {
    font-size: 11px;
    opacity: 0.35;
    transition: opacity 0.2s ease;
    margin-left: 2px;
}

.gkss-file-name.is-editable:hover .gkss-file-name-edit-icon {
    opacity: 1;
}

.gkss-file-name-edit-wrap {
    display: inline-flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    margin-right: 15px;
}

.gkss-file-name-input {
    font-size: 13px;
    font-weight: bold;
    color: #333;
    padding: 2px 6px;
    border: 1px solid #0073aa;
    border-radius: 3px;
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 1px #0073aa;
    max-width: 280px;
    min-width: 120px;
    box-sizing: border-box;
}

.gkss-file-ext-label {
    font-size: 13px;
    font-weight: normal;
    color: #777;
    margin-left: 3px;
    user-select: none;
    white-space: nowrap;
}

.gkss-file-status {
    font-size: 12px;
    color: #666;
    text-align: right;
    margin-right: 10px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gkss-progress-bar-container {
    height: 6px;
    background-color: #e0e0e0;
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.gkss-progress-bar {
    height: 100%;
    background-color: #0073aa;
    width: 0%;
    transition: width 0.2s ease;
    /* Reset potential conflicts */
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
}

.gkss-progress-bar.gkss-success {
    background-color: #46b450 !important;
    width: 100% !important;
}

.gkss-progress-bar.error {
    background-color: #dc3232 !important;
}

.gkss-file-remove {
    color: #dc3232;
    cursor: pointer;
    font-size: 12px;
    line-height: 1.4;
    display: none;
    padding: 2px 8px;
    border: 1px solid #f5c6cb;
    border-radius: 3px;
    background-color: #fff;
    white-space: nowrap;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.gkss-file-remove:hover {
    color: #fff;
    background-color: #dc3232;
    border-color: #dc3232;
}

.gkss-file-item.completed .gkss-file-remove,
.gkss-file-item.error .gkss-file-remove {
    display: inline-block;
}

/* 上限到達時のドロップゾーン表示 */
.gkss-drive-uploader.is-at-max {
    border-color: #c3c4c7;
    background-color: #f6f7f7;
}

.gkss-drive-uploader.is-at-max:hover {
    border-color: #0073aa;
    background-color: #f0f6fc;
}

.gkss-drive-uploader.is-at-max .gkss-drive-icon svg {
    fill: #8c8f94;
}

/* Multiline Text Helper for Confirmation Screen */
.gkss-multiline-text {
    white-space: pre-wrap;
    display: inline-block;
}

/* Validation Errors */
.gkss-error-message {
    color: #dc3232;
    font-size: 12px;
    margin-top: 5px;
    text-align: left;
}

/* Floating Global Upload Bar */
.gkss-floating-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: #23282d;
    color: #fff;
    z-index: 999999;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    padding: 10px 20px;
    box-sizing: border-box;
    display: none;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    font-size: 13px;
    transition: all 0.3s ease;
}

.gkss-floating-progress-bar .gkss-floating-inner {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gkss-floating-progress-bar .gkss-floating-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.gkss-floating-progress-bar .gkss-floating-title {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 75%;
}

.gkss-floating-progress-bar .gkss-floating-status {
    font-weight: bold;
    color: #72aee6;
}

.gkss-floating-progress-bar .gkss-floating-track {
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
    width: 100%;
}

.gkss-floating-progress-bar .gkss-floating-fill {
    height: 100%;
    width: 0%;
    background: #2271b1;
    transition: width 0.15s ease;
}

.gkss-floating-progress-bar.is-complete .gkss-floating-fill {
    background: #46b450 !important;
}

.gkss-floating-progress-bar.is-complete .gkss-floating-status {
    color: #46b450 !important;
}

/* Submit button upload lock style */
.edss-upload-locked,
input[type="submit"]:disabled.is-uploading,
button[type="submit"]:disabled.is-uploading,
.button:disabled.is-uploading {
    opacity: 0.65 !important;
    cursor: not-allowed !important;
    position: relative !important;
    filter: grayscale(0.5);
}

/* Status Helper Classes (to eliminate inline styles) */
.gkss-text-success {
    color: #46b450 !important;
    font-weight: bold !important;
}

.gkss-text-danger {
    color: #dc3232 !important;
    font-weight: bold !important;
}

.gkss-file-remove-visible {
    display: block !important;
}

.gkss-global-error-margin {
    margin-bottom: 10px !important;
}

.gkss-upload-status {
    margin-top: 5px;
    font-size: 13px;
    font-weight: bold;
    color: #333;
}

.gkss-upload-status-waiting {
    color: #e67e22 !important;
}

.gkss-upload-status-error {
    color: #dc3232 !important;
}

.gkss-upload-status-ok {
    color: #46b450 !important;
}