/**
 * Sales Manager Assessment Tool - WordPress Plugin Styles
 * Based on modern Vercel/Shadcn aesthetic
 */

/* Container */
.sma-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.5;
    color: #111827;
    background: #ffffff;
    min-height: 100vh;
    margin: 0 auto;
    max-width: 1280px;
    padding: 1rem;
}

@media (min-width: 640px) {
    .sma-wrapper {
        padding: 2rem;
    }
}

/* Header */
.sma-header {
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 640px) {
    .sma-header {
        padding-bottom: 2rem;
        margin-bottom: 2rem;
    }
}

.sma-header-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .sma-header-content {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.sma-main-title {
    font-size: 1.875rem;
    font-weight: 600;
    letter-spacing: -0.025em;
    color: #111827;
    margin: 0;
}

@media (min-width: 640px) {
    .sma-main-title {
        font-size: 2.25rem;
    }
}

.sma-subtitle {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.5rem 0 0 0;
}

.sma-reset-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sma-reset-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.sma-reset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6b7280;
}

.sma-assessment-result {
    margin-top: 1.5rem;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 640px) {
    .sma-assessment-result {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

.sma-overall-score {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
}

.sma-score-value {
    font-size: 1.5rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
    font-weight: 600;
    color: #111827;
}

@media (min-width: 640px) {
    .sma-score-value {
        font-size: 2rem;
    }
}

.sma-score-max {
    font-size: 0.875rem;
    color: #6b7280;
}

.sma-score-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0.25rem 0 0 0;
}

.sma-rec-status {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sma-text-emerald { color: #059669; }
.sma-text-amber { color: #d97706; }
.sma-text-red { color: #dc2626; }

.sma-rec-description {
    font-size: 0.875rem;
    color: #6b7280;
    margin: 0;
}

/* Main Content Grid */
.sma-main-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (min-width: 1280px) {
    .sma-main-content {
        grid-template-columns: 3fr 2fr;
    }
}

/* Section Titles */
.sma-section-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    margin: 0 0 1.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sma-attribute-count {
    font-size: 0.875rem;
    font-weight: 400;
    color: #6b7280;
}

/* Chart Section */
.sma-chart-container {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
}

@media (min-width: 640px) {
    .sma-chart-container {
        padding: 1.5rem;
    }
}

.sma-chart-wrapper {
    display: flex;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.sma-radar-chart {
    border: 1px solid #f3f4f6;
    border-radius: 0.25rem;
    max-width: 100%;
    height: auto;
}

.sma-radar-label {
    font-size: 0.75rem;
    font-weight: 500;
    fill: #6b7280;
}

.sma-scale-label {
    font-size: 0.75rem;
    fill: #9ca3af;
}

.sma-radar-point {
    cursor: pointer;
    transition: r 0.2s ease;
}

.sma-radar-point:hover {
    r: 6;
}

.sma-hover-info {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: #1f2937;
    color: #ffffff;
    padding: 0.75rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    pointer-events: none;
    z-index: 10;
}

.sma-hover-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.sma-hover-score {
    color: #d1d5db;
}

/* Controls Section */
.sma-controls-section {
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 0.5rem;
    padding: 1rem;
}

@media (min-width: 640px) {
    .sma-controls-section {
        padding: 1.5rem;
    }
}

.sma-scroll-wrapper {
    position: relative;
    margin-bottom: 1.5rem;
}

.sma-controls-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: 20rem;
    overflow-y: auto;
}

/* Custom scrollbar styling */
.sma-controls-container::-webkit-scrollbar {
    width: 6px;
}

.sma-controls-container::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

.sma-controls-container::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sma-controls-container::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

@media (min-width: 640px) {
    .sma-controls-container {
        gap: 1.5rem;
        max-height: 32rem;
    }
}

@media (min-width: 1024px) {
    .sma-controls-container {
        max-height: 24rem;
    }
}

@media (min-width: 1280px) {
    .sma-controls-container {
        max-height: 36rem;
    }
}

.sma-scroll-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2rem;
    background: linear-gradient(to top, #ffffff 0%, rgba(255, 255, 255, 0.8) 50%, transparent 100%);
    pointer-events: none;
    z-index: 1;
}

/* Animated scroll indicator */
.sma-scroll-indicator {
    position: absolute;
    bottom: 0.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    pointer-events: none;
    z-index: 2;
}

.sma-scroll-indicator-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.sma-scroll-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.sma-bounce-arrow {
    animation: bounce 2s infinite;
}

.sma-arrow-icon {
    width: 1rem;
    height: 1rem;
    color: #6b7280;
}

@keyframes bounce {
    0%, 20%, 53%, 80%, 100% {
        animation-timing-function: cubic-bezier(0.215, 0.610, 0.355, 1.000);
        transform: translate3d(0,0,0);
    }
    40%, 43% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -8px, 0);
    }
    70% {
        animation-timing-function: cubic-bezier(0.755, 0.050, 0.855, 0.060);
        transform: translate3d(0, -4px, 0);
    }
    90% {
        transform: translate3d(0, -2px, 0);
    }
}

.sma-control-item {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 0.375rem;
}

.sma-control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.25rem;
}

.sma-control-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
}

.sma-score-display {
    font-size: 0.875rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
    color: #6b7280;
}

.sma-slider {
    width: calc(100% - 0.5rem);
    height: 0.5rem;
    background: linear-gradient(to right, #ef4444 0%, #ef4444 60%, #f59e0b 60%, #f59e0b 80%, #10b981 80%, #10b981 100%);
    border-radius: 0.375rem;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    margin: 0 0.25rem;
}

.sma-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1rem;
    height: 1rem;
    background: #ffffff;
    border: 2px solid #6b7280;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sma-slider::-webkit-slider-thumb:hover {
    border-color: #374151;
    transform: scale(1.1);
}

.sma-slider::-moz-range-thumb {
    width: 1rem;
    height: 1rem;
    background: #ffffff;
    border: 2px solid #6b7280;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sma-status-text {
    font-size: 0.75rem;
    color: #6b7280;
    font-weight: 500;
    text-align: center;
    flex-grow: 1;
    padding: 0 0.5rem;
}

.sma-slider-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.25rem;
    padding: 0 0.25rem;
}

.sma-slider-label-left,
.sma-slider-label-right {
    font-size: 0.75rem;
    color: #9ca3af;
    flex-shrink: 0;
    min-width: 3.5rem;
    padding: 0 0.25rem;
}

.sma-slider-label-left {
    text-align: left;
}

.sma-slider-label-right {
    text-align: right;
}

/* Presets */
.sma-presets {
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

@media (min-width: 640px) {
    .sma-presets {
        padding-top: 1.5rem;
    }
}

.sma-presets-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    margin-bottom: 0.75rem;
}

.sma-preset-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

@media (min-width: 640px) {
    .sma-preset-buttons {
        flex-direction: row;
    }
}

.sma-preset-btn {
    flex: 1;
    padding: 0.5rem 0.75rem;
    font-size: 0.75rem;
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.sma-preset-btn:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.sma-preset-btn:focus {
    outline: none;
    box-shadow: 0 0 0 2px #6b7280;
}

/* Breakdown Section */
.sma-breakdown-section {
    margin-top: 2rem;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 0.5rem;
}

.sma-expand-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    border: none;
    background: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    font-size: 1.125rem;
    font-weight: 600;
    color: #111827;
    cursor: pointer;
    border-bottom: 1px solid #e5e7eb;
    transition: background 0.2s ease;
}

.sma-expand-btn:hover {
    background: #f9fafb;
}

.sma-expand-btn:focus {
    outline: none;
    background: #f9fafb;
}

.sma-expand-icon {
    color: #6b7280;
    transition: transform 0.2s ease;
}

.sma-detailed-breakdown {
    padding: 1rem;
}

@media (min-width: 640px) {
    .sma-detailed-breakdown {
        padding: 1.5rem;
    }
}

.sma-detailed-breakdown {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 1024px) {
    .sma-detailed-breakdown {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
}

.sma-detail-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
}

.sma-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.sma-detail-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

@media (min-width: 640px) {
    .sma-detail-title {
        font-size: 1rem;
    }
}

.sma-detail-score-value {
    font-size: 1.125rem;
    font-family: ui-monospace, SFMono-Regular, "SF Mono", monospace;
    color: #111827;
}

.sma-detail-status {
    font-size: 0.75rem;
    font-weight: 500;
}

.sma-status-high .sma-detail-status { color: #059669; }
.sma-status-mid .sma-detail-status { color: #d97706; }
.sma-status-low .sma-detail-status { color: #dc2626; }

.sma-progress-bar {
    background: #f3f4f6;
    height: 0.375rem;
    border-radius: 0.1875rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.sma-progress-fill {
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 0.1875rem;
}

.sma-status-high .sma-progress-fill { background: #10b981; }
.sma-status-mid .sma-progress-fill { background: #f59e0b; }
.sma-status-low .sma-progress-fill { background: #ef4444; }

.sma-behavior-description {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sma-current-level,
.sma-target-level {
    padding: 0.75rem;
    border-left: 2px solid;
    border-radius: 0.375rem;
}

.sma-current-level h4,
.sma-target-level h4 {
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 0.5rem 0;
}

.sma-current-level p,
.sma-target-level p {
    font-size: 0.875rem;
    margin: 0;
    line-height: 1.4;
}

.sma-status-high .sma-current-level {
    border-color: #10b981;
    background: #ecfdf5;
}

.sma-status-high .sma-current-level h4 {
    color: #065f46;
}

.sma-status-high .sma-current-level p {
    color: #047857;
}

.sma-status-mid .sma-current-level {
    border-color: #f59e0b;
    background: #fffbeb;
}

.sma-status-mid .sma-current-level h4 {
    color: #92400e;
}

.sma-status-mid .sma-current-level p {
    color: #b45309;
}

.sma-status-low .sma-current-level {
    border-color: #ef4444;
    background: #fef2f2;
}

.sma-status-low .sma-current-level h4 {
    color: #991b1b;
}

.sma-status-low .sma-current-level p {
    color: #dc2626;
}

.sma-target-level {
    border-color: #10b981;
    background: #ecfdf5;
}

.sma-target-level h4 {
    color: #065f46;
}

.sma-target-level p {
    color: #047857;
}

/* Footer */
.sma-footer {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
    color: #6b7280;
}

@media (min-width: 640px) {
    .sma-footer {
        margin-top: 2rem;
        padding-top: 2rem;
    }
}

.sma-footer p {
    font-size: 0.875rem;
    margin: 0.25rem 0;
}

.sma-tagline {
    font-size: 0.75rem;
    font-style: italic;
}

/* Loading State */
.sma-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    font-size: 1rem;
    color: #6b7280;
}

/* Responsive Adjustments */
@media (max-width: 640px) {
    .sma-wrapper {
        padding: 0.5rem;
    }
    
    .sma-main-title {
        font-size: 1.5rem;
    }
    
    .sma-chart-container,
    .sma-controls-section {
        padding: 0.75rem;
    }
    
    .sma-controls-container {
        max-height: 16rem;
        gap: 1rem;
    }
    
    .sma-detailed-breakdown {
        padding: 0.75rem;
        gap: 1rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .sma-wrapper {
        border: 2px solid;
    }
    
    .sma-slider {
        border: 2px solid;
    }
}

/* Print styles */
@media print {
    .sma-reset-btn,
    .sma-preset-buttons,
    .sma-controls-container {
        display: none;
    }
    
    .sma-wrapper {
        background: white;
        color: black;
    }
}