/**
 * CSS untuk GuruSinergi Integrated Uploader
 */

:root {
    --gsiu-primary: #4e68ff;
    --gsiu-primary-dark: #3a54e4;
    --gsiu-secondary: #9c6bdb;
    --gsiu-gradient-start: #4e68ff;
    --gsiu-gradient-end: #9c6bdb;
    --gsiu-text-dark: #333333;
    --gsiu-text-light: #666666;
    --gsiu-border: #dddddd;
    --gsiu-bg-light: #f8f9fa;
    --gsiu-bg-white: #ffffff;
    --gsiu-success: #28a745;
    --gsiu-error: #dc3545;
    --gsiu-warning: #ffc107;
    --gsiu-shadow: rgba(0, 0, 0, 0.1);
}

/* Container utama */
.gsiu-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    background-color: var(--gsiu-bg-white);
    border-radius: 10px;
    box-shadow: 0 5px 15px var(--gsiu-shadow);
}

/* Header section */
.gsiu-header {
    text-align: center;
    margin-bottom: 30px;
}

.gsiu-header h2 {
    font-size: 28px;
    margin-bottom: 15px;
    background: linear-gradient(45deg, var(--gsiu-gradient-start), var(--gsiu-gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.gsiu-header p {
    font-size: 16px;
    color: var(--gsiu-text-light);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Tabs */
.gsiu-tabs {
    display: flex;
    border-bottom: 1px solid var(--gsiu-border);
    margin-bottom: 25px;
}

.gsiu-tab {
    padding: 12px 20px;
    cursor: pointer;
    font-weight: 500;
    color: var(--gsiu-text-light);
    border-bottom: 2px solid transparent;
    transition: all 0.3s ease;
}

.gsiu-tab:hover {
    color: var(--gsiu-primary);
}

.gsiu-tab.active {
    color: var(--gsiu-primary);
    border-bottom-color: var(--gsiu-primary);
}

/* Form styling */
.gsiu-form {
    margin-bottom: 30px;
}

.gsiu-form-group {
    margin-bottom: 20px;
}

.gsiu-form-row {
    display: flex;
    margin: 0 -10px;
}

.gsiu-col-6 {
    flex: 0 0 50%;
    padding: 0 10px;
}

.gsiu-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gsiu-text-dark);
}

.gsiu-required::after {
    content: '*';
    color: var(--gsiu-error);
    margin-left: 5px;
}

.gsiu-form input[type="text"],
.gsiu-form input[type="number"],
.gsiu-form textarea,
.gsiu-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gsiu-border);
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.gsiu-form input:focus,
.gsiu-form textarea:focus,
.gsiu-form select:focus {
    border-color: var(--gsiu-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(78, 104, 255, 0.1);
}

.gsiu-form-help {
    font-size: 13px;
    color: var(--gsiu-text-light);
    margin-top: 5px;
}

/* File upload styling */
.gsiu-file-upload {
    position: relative;
    margin-top: 5px;
}

.gsiu-file-upload input[type="file"] {
    position: absolute;
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    z-index: -1;
}

.gsiu-file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    background-color: var(--gsiu-bg-light);
    border: 2px dashed var(--gsiu-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.gsiu-file-label:hover {
    background-color: rgba(78, 104, 255, 0.05);
    border-color: var(--gsiu-primary);
}

.gsiu-icon-upload {
    display: inline-block;
    width: 40px;
    height: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%234e68ff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path><polyline points="17 8 12 3 7 8"></polyline><line x1="12" y1="3" x2="12" y2="15"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-bottom: 10px;
}

.gsiu-selected-file {
    display: flex;
    align-items: center;
    padding: 15px;
    background-color: rgba(78, 104, 255, 0.05);
    border: 1px solid var(--gsiu-primary);
    border-radius: 8px;
}

.gsiu-file-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 10px;
}

.gsiu-file-size {
    color: var(--gsiu-text-light);
    margin-right: 10px;
}

.gsiu-remove-file {
    background: none;
    border: none;
    color: var(--gsiu-error);
    cursor: pointer;
    padding: 5px;
}

.gsiu-icon-close {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="%23dc3545" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Thumbnail upload */
.gsiu-thumbnail-upload {
    display: flex;
    align-items: center;
    margin-top: 5px;
}

.gsiu-thumbnail-preview {
    width: 150px;
    height: 100px;
    border: 1px solid var(--gsiu-border);
    border-radius: 8px;
    overflow: hidden;
    margin-right: 15px;
}

.gsiu-thumbnail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gsiu-thumbnail-label {
    display: inline-block;
    padding: 10px 15px;
    background: linear-gradient(45deg, var(--gsiu-gradient-start), var(--gsiu-gradient-end));
    color: white;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s;
}

.gsiu-thumbnail-label:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Form navigation */
.gsiu-form-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.gsiu-submit-btn, .gsiu-primary-btn {
    padding: 12px 24px;
    background: linear-gradient(45deg, var(--gsiu-gradient-start), var(--gsiu-gradient-end));
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.gsiu-submit-btn:hover, .gsiu-primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.gsiu-alt-btn, .gsiu-cancel-btn {
    padding: 12px 24px;
    background-color: var(--gsiu-bg-light);
    color: var(--gsiu-text-dark);
    border: 1px solid var(--gsiu-border);
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.gsiu-alt-btn:hover, .gsiu-cancel-btn:hover {
    background-color: var(--gsiu-bg-white);
    border-color: var(--gsiu-primary);
    color: var(--gsiu-primary);
}

/* Progress bar */
.gsiu-upload-progress {
    margin: 30px 0;
}

.gsiu-progress-bar {
    height: 10px;
    background-color: var(--gsiu-bg-light);
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 10px;
}

.gsiu-progress-fill {
    height: 100%;
    background: linear-gradient(45deg, var(--gsiu-gradient-start), var(--gsiu-gradient-end));
    width: 0;
    transition: width 0.3s;
}

.gsiu-progress-text {
    text-align: center;
    font-weight: 500;
}

/* Upload result */
.gsiu-upload-result {
    margin: 30px 0;
    text-align: center;
}

.gsiu-success {
    padding: 15px;
    background-color: rgba(40, 167, 69, 0.1);
    border-left: 4px solid var(--gsiu-success);
    color: var(--gsiu-success);
    border-radius: 4px;
    margin-bottom: 20px;
}

.gsiu-error {
    padding: 15px;
    background-color: rgba(220, 53, 69, 0.1);
    border-left: 4px solid var(--gsiu-error);
    color: var(--gsiu-error);
    border-radius: 4px;
    margin-bottom: 20px;
}

.gsiu-result-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

/* Advanced tab content */
.gsiu-advanced-info {
    background-color: var(--gsiu-bg-light);
    border-radius: 8px;
    padding: 25px;
}

.gsiu-advanced-info h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--gsiu-primary);
}

.gsiu-advanced-info ul {
    margin-bottom: 25px;
}

.gsiu-advanced-info li {
    margin-bottom: 8px;
}

.gsiu-advanced-action {
    text-align: center;
}

/* History tab content */
.gsiu-history-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.gsiu-history-table th, 
.gsiu-history-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--gsiu-border);
}

.gsiu-history-table th {
    background-color: var(--gsiu-bg-light);
    font-weight: 600;
}

.gsiu-action-btn {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    margin-right: 5px;
}

.gsiu-download {
    background-color: var(--gsiu-primary);
    color: white;
}

.gsiu-view {
    background-color: var(--gsiu-bg-light);
    color: var(--gsiu-text-dark);
}

.gsiu-no-history {
    text-align: center;
    padding: 30px;
    background-color: var(--gsiu-bg-light);
    border-radius: 8px;
}

/* Popup styling */
.gsiu-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.gsiu-popup-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.gsiu-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid var(--gsiu-border);
}

.gsiu-popup-header h3 {
    margin: 0;
}

.gsiu-close-popup {
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.gsiu-popup-body {
    padding: 20px;
}

/* Responsive styles */
@media (max-width: 768px) {
    .gsiu-container {
        padding: 20px;
    }
    
    .gsiu-form-row {
        flex-direction: column;
    }
    
    .gsiu-col-6 {
        flex: 0 0 100%;
        padding: 0;
    }
    
    .gsiu-thumbnail-upload {
        flex-direction: column;
    }
    
    .gsiu-thumbnail-preview {
        margin-right: 0;
        margin-bottom: 15px;
        width: 100%;
        height: 200px;
    }
    
    .gsiu-tabs {
        flex-wrap: wrap;
    }
    
    .gsiu-tab {
        padding: 10px 15px;
    }
    
    .gsiu-form-nav {
        flex-direction: column;
        gap: 10px;
    }
    
    .gsiu-submit-btn, .gsiu-alt-btn {
        width: 100%;
    }
    
    .gsiu-history-table {
        display: block;
        overflow-x: auto;
    }
}