/**
 * Frontend Styles for Adobe Stock Metadata Generator
 *
 * Matches the UI mockup design with two-column layout
 *
 * @package AdobeStockMetadata
 * @since 1.0.0
 */

/* ========================================
   Reset & Base Styles
   ======================================== */
.asm-container {
    max-width: 1400px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
    color: #1d2327;
}

.asm-container * {
    box-sizing: border-box;
}

/* ========================================
   Header
   ======================================== */
.asm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.asm-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asm-logo h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #1d2327;
}

.asm-subtitle {
    font-size: 13px;
    color: #646970;
    font-weight: 400;
}

.asm-stats {
    display: flex;
    gap: 20px;
}

.asm-stat-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f0f6fc;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #0066FF;
}

.asm-stat-item svg {
    color: #0066FF;
}

/* ========================================
   Main Layout
   ======================================== */
.asm-main {
    display: grid;
    grid-template-columns: 380px 1fr;
    gap: 30px;
    min-height: 600px;
}

/* ========================================
   Sidebar (Left Column)
   ======================================== */
.asm-sidebar {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.asm-panel {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.asm-panel-header {
    display: flex;
    gap: 10px;
    padding: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.asm-settings-content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    max-height: calc(100vh - 300px);
}

/* ========================================
   Buttons
   ======================================== */
.asm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.asm-btn-primary {
    background: #0066FF;
    color: #ffffff;
    flex: 1;
}

.asm-btn-primary:hover {
    background: #0052CC;
    transform: translateY(-1px);
}

.asm-btn-secondary {
    background: #f3f4f6;
    color: #1d2327;
    border: 1px solid #e5e7eb;
}

.asm-btn-secondary:hover {
    background: #e5e7eb;
}

.asm-btn-danger {
    background: #dc3232;
    color: #ffffff;
}

.asm-btn-danger:hover {
    background: #b52727;
}

.asm-btn-icon {
    background: transparent;
    border: none;
    padding: 6px;
    cursor: pointer;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.asm-btn-icon:hover {
    background: #f3f4f6;
}

.asm-btn-delete {
    color: #dc3232;
}

.asm-btn-view {
    color: #0066FF;
}

/* ========================================
   Settings Groups
   ======================================== */
.asm-setting-group {
    margin-bottom: 24px;
}

.asm-setting-group:last-child {
    margin-bottom: 0;
}

.asm-setting-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #1d2327;
    margin-bottom: 8px;
}

.asm-setting-description {
    display: block;
    font-size: 12px;
    font-weight: 400;
    color: #646970;
    margin-top: 4px;
}

/* ========================================
   Form Controls
   ======================================== */
.asm-input,
.asm-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: #ffffff;
    color: #1d2327;
    transition: border-color 0.2s;
}

.asm-input:focus,
.asm-select:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
}

.asm-input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.asm-range-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.asm-input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.asm-input-group label {
    font-size: 12px;
    color: #646970;
    font-weight: 500;
}

.asm-input-suffix {
    font-size: 12px;
    color: #646970;
    margin-top: 4px;
}

/* ========================================
   Toggle Switch
   ======================================== */
.asm-toggle-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.asm-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.asm-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.asm-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .3s;
    border-radius: 24px;
}

.asm-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
}

.asm-switch input:checked + .asm-slider {
    background-color: #0066FF;
}

.asm-switch input:checked + .asm-slider:before {
    transform: translateX(20px);
}

/* ========================================
   Style Button
   ======================================== */
.asm-style-btn {
    padding: 10px;
    border: 2px solid #e5e7eb;
    background: #ffffff;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.asm-style-btn:hover {
    border-color: #0066FF;
}

.asm-style-btn-active {
    border-color: #0066FF;
    background: #f0f6fc;
}

.asm-style-btn svg {
    color: #646970;
}

.asm-style-btn-active svg {
    color: #0066FF;
}

/* ========================================
   Content Area (Right Column)
   ======================================== */
.asm-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* ========================================
   Upload Section
   ======================================== */
.asm-upload-section {
    background: #ffffff;
    border: 2px dashed #d1d5db;
    border-radius: 12px;
    overflow: hidden;
}

.asm-upload-zone {
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.asm-upload-zone:hover {
    background: #f9fafb;
    border-color: #0066FF;
}

.asm-drag-over {
    background: #f0f6fc;
    border-color: #0066FF;
}

.asm-upload-icon {
    color: #9ca3af;
    margin-bottom: 16px;
}

.asm-upload-zone h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.asm-upload-zone p {
    margin: 8px 0;
    font-size: 14px;
    color: #646970;
}

.asm-upload-zone a {
    color: #0066FF;
    text-decoration: none;
    font-weight: 600;
}

.asm-upload-zone a:hover {
    text-decoration: underline;
}

.asm-upload-formats {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 20px 0;
}

.asm-format-badge {
    padding: 4px 12px;
    background: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
}

.asm-upload-limit {
    font-size: 13px;
    color: #9ca3af;
}

.asm-upload-privacy {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 12px;
    color: #9ca3af;
    margin-top: 16px;
}

.asm-upload-privacy svg {
    color: #9ca3af;
}

/* ========================================
   Progress Bar
   ======================================== */
.asm-progress {
    padding: 20px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.asm-progress-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
}

.asm-progress-text {
    color: #1d2327;
}

.asm-progress-percentage {
    color: #0066FF;
}

.asm-progress-bar {
    width: 100%;
    height: 8px;
    background: #e5e7eb;
    border-radius: 4px;
    overflow: hidden;
}

.asm-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #0066FF, #0052CC);
    transition: width 0.3s ease;
    border-radius: 4px;
}

/* ========================================
   Results Section
   ======================================== */
.asm-results-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    overflow: hidden;
}

.asm-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
}

.asm-results-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.asm-results-actions {
    display: flex;
    gap: 10px;
}

/* ========================================
   Results Table
   ======================================== */
.asm-table-container {
    overflow-x: auto;
}

.asm-table {
    width: 100%;
    border-collapse: collapse;
}

.asm-table thead {
    background: #f9fafb;
}

.asm-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid #e5e7eb;
}

.asm-table td {
    padding: 16px;
    font-size: 14px;
    color: #1d2327;
    border-bottom: 1px solid #f3f4f6;
}

.asm-table tbody tr:hover {
    background: #f9fafb;
}

.asm-table tbody tr:last-child td {
    border-bottom: none;
}

.asm-filename {
    font-weight: 500;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asm-title {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.asm-keywords {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #646970;
    font-size: 13px;
}

.asm-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

/* ========================================
   Status Badges
   ======================================== */
.asm-status {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.asm-status-pending {
    background: #f3f4f6;
    color: #646970;
}

.asm-status-processing {
    background: #fef3c7;
    color: #92400e;
}

.asm-status-completed {
    background: #d1fae5;
    color: #065f46;
}

.asm-status-failed {
    background: #fee2e2;
    color: #991b1b;
}

/* ========================================
   Notice
   ======================================== */
.asm-notice {
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.asm-notice-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    color: #856404;
}

.asm-notice h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.asm-notice p {
    margin: 0;
    font-size: 14px;
}

.asm-notice a {
    color: #0066FF;
    font-weight: 600;
}

/* ========================================
   Responsive Design
   ======================================== */
@media screen and (max-width: 1024px) {
    .asm-main {
        grid-template-columns: 1fr;
    }
    
    .asm-sidebar {
        order: 2;
    }
    
    .asm-content {
        order: 1;
    }
    
    .asm-settings-content {
        max-height: none;
    }
}

@media screen and (max-width: 768px) {
    .asm-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .asm-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .asm-panel-header {
        flex-direction: column;
    }
    
    .asm-range-inputs {
        grid-template-columns: 1fr;
    }
    
    .asm-results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .asm-results-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .asm-table {
        font-size: 12px;
    }
    
    .asm-table th,
    .asm-table td {
        padding: 10px;
    }
}

/* ========================================
   Loading States
   ======================================== */
.asm-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.6;
}

.asm-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0066FF;
    border-radius: 50%;
    animation: asm-spin 1s linear infinite;
}

@keyframes asm-spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ========================================
   Scrollbar Styling
   ======================================== */
.asm-settings-content::-webkit-scrollbar,
.asm-table-container::-webkit-scrollbar {
    width: 8px;
}

.asm-settings-content::-webkit-scrollbar-track,
.asm-table-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 4px;
}

.asm-settings-content::-webkit-scrollbar-thumb,
.asm-table-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 4px;
}

.asm-settings-content::-webkit-scrollbar-thumb:hover,
.asm-table-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}
