/* CarbonGuru File Analysis Styles */

.carbonguru-file-analysis,
.carbonguru-sessions-list {
    padding: 20px 0;
}

.upload-section {
    background: linear-gradient(135deg, #f8faf9 0%, #f0f4f2 100%);
    padding: 32px;
    border-radius: 12px;
    margin-bottom: 24px;
    border: 1px solid #e0e6e3;
    box-shadow: 0 2px 8px rgba(6, 127, 56, 0.06);
}

/* File Requirements Section */
.file-requirements {
    background: #fff;
    padding: 24px;
    border-left: 4px solid var(--wp--preset--color--cg-green-600, #067F38);
    border-radius: 8px;
    margin-bottom: 28px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.file-requirements h3 {
    margin-top: 0;
    color: var(--wp--preset--color--cg-green-600, #067F38);
    font-size: 18px;
    font-weight: 600;
}

.file-requirements h4 {
    margin-top: 20px;
    margin-bottom: 10px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
}

.requirements-summary {
    font-size: 13px;
    color: #4a5568;
    margin-bottom: 16px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #e6f5ec 0%, #f0f9f4 100%);
    border-radius: 8px;
    border: 1px solid #c8e6d5;
}

.required-columns {
    list-style: none;
    padding: 0;
    margin: 0;
}

.required-columns li {
    padding: 10px 12px;
    margin-bottom: 6px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #e9ecef;
    font-size: 14px;
}

.required-columns li:last-child {
    margin-bottom: 0;
}

.required-columns strong {
    color: var(--wp--preset--color--cg-green-600, #067F38);
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 13px;
    background: #e6f5ec;
    padding: 2px 6px;
    border-radius: 4px;
}

.file-example {
    margin-top: 20px;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.file-example strong {
    display: block;
    margin-bottom: 12px;
    color: #1a1a1a;
    font-size: 14px;
}

.file-example pre {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #e2e8f0;
    padding: 16px;
    border-radius: 8px;
    overflow-x: auto;
    font-family: 'SF Mono', Monaco, 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.7;
    margin: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

/* Upload Form */
.upload-form {
    margin-top: 24px;
    background: #fff;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border: 1px solid #e9ecef;
}

.form-field {
    margin-bottom: 20px;
}

.form-field label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-size: 14px;
}

.form-field .required {
    color: #e53e3e;
    font-weight: 700;
}

.form-field select,
.form-field input[type="file"] {
    width: 100%;
    max-width: 100%;
    padding: 12px 14px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field select:focus,
.form-field input[type="file"]:focus {
    outline: none;
    border-color: var(--wp--preset--color--cg-green-600, #067F38);
    box-shadow: 0 0 0 3px rgba(6, 127, 56, 0.1);
}

.form-field small {
    display: block;
    margin-top: 6px;
    color: #718096;
    font-size: 12px;
    font-style: normal;
}

#file-upload {
    padding: 12px;
    cursor: pointer;
}

#upload-btn {
    padding: 14px 32px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 12px;
    background: var(--wp--preset--color--cg-green-600, #067F38);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    box-shadow: 0 2px 4px rgba(6, 127, 56, 0.2);
    display: block;
    margin-left: auto;
}

#upload-btn:hover {
    background: var(--wp--preset--color--cg-green-300, #63BFA2);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(6, 127, 56, 0.25);
}

#upload-btn:active {
    transform: translateY(0);
}

/* Error Box */
.error-box {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 2px solid #fc8181;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    color: #c53030;
}

.error-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #ebf8ff 0%, #bee3f8 100%);
    border: 2px solid #63b3ed;
    border-radius: 10px;
    padding: 20px;
    margin-top: 20px;
    color: #2b6cb0;
}

.info-box strong {
    display: block;
    margin-bottom: 10px;
    font-size: 15px;
}

.processing-section {
    background: #fff;
    padding: 32px;
    border: 2px solid var(--wp--preset--color--cg-green-600, #067F38);
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(6, 127, 56, 0.1);
}

.progress-info {
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.status-message {
    font-size: 16px;
    font-weight: 600;
    color: var(--wp--preset--color--cg-green-600, #067F38);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-message::before {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid var(--wp--preset--color--cg-green-600, #067F38);
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.items-processed {
    font-size: 14px;
    color: #4a5568;
}

.items-processed .count {
    font-weight: 700;
    color: var(--wp--preset--color--cg-green-600, #067F38);
    font-size: 18px;
}

.processed-items {
    margin-top: 24px;
}

.processed-items h4 {
    margin-bottom: 16px;
    color: #1a1a1a;
    font-size: 15px;
    font-weight: 600;
}

#items-list {
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
}

/* Recent Items - Extension Style */
.recent-item {
    background: linear-gradient(135deg, #f8faf9 0%, #f0f4f2 100%);
    border-radius: 8px;
    padding: 12px 14px;
    margin-bottom: 8px;
    border: 1px solid #e0e6e3;
    animation: slideIn 0.3s ease-out;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.recent-item:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 6px rgba(6, 127, 56, 0.1);
}

.recent-item:last-child {
    margin-bottom: 0;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-name {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.4;
}

.item-footprint {
    color: var(--wp--preset--color--cg-green-600, #067F38);
    font-weight: 600;
    font-size: 13px;
}

.carbon-cost-badge {
    font-size: 12px;
    color: #c53030;
    font-weight: 600;
    margin-left: 10px;
    padding: 3px 8px;
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    border-radius: 6px;
    display: inline-block;
}

.completion-section {
    background: linear-gradient(135deg, #e6f5ec 0%, #c8e6d5 100%);
    padding: 40px;
    border: 2px solid var(--wp--preset--color--cg-green-600, #067F38);
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(6, 127, 56, 0.15);
}

.success-message h3 {
    color: var(--wp--preset--color--cg-green-600, #067F38);
    margin-bottom: 16px;
    font-size: 20px;
}

.success-message p {
    margin-bottom: 16px;
    color: #1a1a1a;
}

.success-message a.button {
    margin: 6px;
    padding: 12px 24px;
    background: var(--wp--preset--color--cg-green-600, #067F38);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.success-message a.button:hover {
    background: var(--wp--preset--color--cg-green-300, #63BFA2);
    transform: translateY(-1px);
}

.success-message a.button:not(.button-primary) {
    background: #4a5568;
}

.success-message a.button:not(.button-primary):hover {
    background: #718096;
}

/* Sessions List */
.shop_table_responsive {
    margin-top: 20px;
}

.shop_table_responsive td {
    padding: 12px;
}

.shop_table_responsive td[data-title="Actions"] {
    text-align: right;
}

#sessions-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .upload-form {
        flex-direction: column;
    }

    #file-upload {
        width: 100%;
    }
}
