/* Pantone Matcher Interface Styles */
.pantone-matcher-interface {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

/* Main Matcher Card - Full Width */
.main-matcher-card {
    width: 100%;
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.main-matcher-card:hover {
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
}

.matcher-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: stretch;
}

/* Input Section - Left Side */
.input-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding-right: 2rem;
    border-right: 2px solid #f0f0f0;
}

.input-header {
    margin-bottom: 0.5rem;
}

.section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.section-description {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

/* Color Picker Section */
.color-picker-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.picker-display-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picker-display {
    width: 160px;
    height: 160px;
    border-radius: 20px;
    border: 4px solid #f0f0f0;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    background: #e74c3c;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
}

.picker-display:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
}

.color-picker-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.picker-label-text {
    font-size: 0.875rem;
    color: #666;
    font-weight: 500;
    text-align: center;
}

/* Input Methods Wrapper */
.input-methods-wrapper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.input-method-card {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    background: #f8f9fa;
    padding: 1.25rem;
    border-radius: 16px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.input-method-card:focus-within {
    border-color: #667eea;
    background: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.1);
}

.method-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.label-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: #667eea;
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
}

.method-input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    
    transition: all 0.3s ease;
}

.method-input::placeholder {
    color: #999;
    font-weight: 400;
}

.method-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.rgb-group {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
}

.rgb-input {
    width: 100%;
    padding: 0.875rem 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    
    transition: all 0.3s ease;
}

.rgb-input::placeholder {
    color: #999;
    font-weight: 400;
}

.rgb-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.rgb-input::-webkit-inner-spin-button,
.rgb-input::-webkit-outer-spin-button {
    opacity: 1;
}

/* Match Button */
.match-button {
    width: 100%;
    padding: 1.125rem 2rem;
    border: none;
    border-radius: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    margin-top: 0.5rem;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.match-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(102, 126, 234, 0.4);
}

.match-button:active {
    transform: translateY(0);
}

.button-icon {
    transition: transform 0.3s ease;
    stroke: currentColor;
}

.match-button:hover .button-icon {
    transform: translateX(4px);
}

/* Results Section - Right Side */
.results-section {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.results-header {
    margin-bottom: 0.5rem;
}

.current-color-display {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 16px;
    border: 2px solid #e9ecef;
}

.current-color-swatch-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.current-color-swatch {
    width: 128px;
    height: 128px;
    border-radius: 16px;
    border: 2px solid #e9ecef;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.swatch-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.current-color-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.color-value-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: white;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.value-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #667eea;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.value-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: #333;
    
}

/* Matches Grid */
.matches-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    padding-right: 0.5rem;
}

.matches-grid::-webkit-scrollbar {
    width: 6px;
}

.matches-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.matches-grid::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

.matches-grid::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: #999;
    font-size: 0.95rem;
}

.match-card {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    padding: 1.25rem;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.match-card:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    background: white;
}

.match-accuracy {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.match-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.match-color-swatch {
    width: 60px;
    height: 60px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.match-info {
    flex: 1;
    min-width: 0;
}

.match-name {
    font-size: 1rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.25rem 0;
    word-break: break-word;
    line-height: 1.3;
}

.match-code {
    font-size: 0.85rem;
    color: #667eea;
    font-weight: 600;
    word-break: break-word;
}

.match-details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding-top: 1rem;
    border-top: 2px solid #e9ecef;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

.detail-label {
    font-weight: 600;
    color: #666;
}

.detail-value {
    
    font-weight: 600;
    color: #333;
}

.copy-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}

.copy-btn {
    flex: 1;
    min-width: 80px;
    padding: 0.5rem 0.75rem;
    border: 2px solid #667eea;
    border-radius: 8px;
    background: white;
    color: #667eea;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: #667eea;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.copy-btn:active {
    transform: translateY(0);
}

/* Database Section - Full Width, No Scroll */
.database-section {
    background: white;
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.database-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2rem;
}

.database-header {
    flex: 1;
    text-align: left;
}

.database-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    margin: 0 0 0.5rem 0;
}

.database-subtitle {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
}

.pantone-search-container {
    position: relative;
    flex-shrink: 0;
    min-width: 300px;
    max-width: 400px;
}

.pantone-search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #999;
    pointer-events: none;
    z-index: 1;
}

.pantone-search-input {
    width: 100%;
    padding: 1rem 1rem 1rem 3.5rem;
    border: 2px solid #e9ecef;
    border-radius: 14px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.pantone-search-input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.database-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.25rem;
    overflow: visible;
}

.pantone-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.pantone-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.pantone-color-preview {
    width: 100%;
    height: 70px;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    margin-bottom: 0.5rem;
}

.pantone-name {
    font-weight: 700;
    font-size: 0.875rem;
    color: #333;
    margin: 0;
    word-break: break-word;
    line-height: 1.3;
}

.pantone-code {
    font-size: 0.75rem;
    color: #666;
    margin: 0;
    word-break: break-word;
}

/* Mobile Responsive Styles */
@media (max-width: 968px) {
    .matcher-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .input-section {
        padding-right: 0;
        border-right: none;
        border-bottom: 2px solid #f0f0f0;
        padding-bottom: 2rem;
    }

    .results-section {
        padding-left: 0;
        padding-top: 2rem;
    }

    .matches-grid {
        max-height: none;
        overflow-y: visible;
    }
}

@media (max-width: 768px) {
    .pantone-matcher-interface {
        gap: 2rem;
    }

    .main-matcher-card,
    .database-section {
        padding: 2rem 1.5rem;
        border-radius: 20px;
    }

    .picker-display {
        width: 140px;
        height: 140px;
    }

    .database-top-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1.5rem;
    }

    .database-header {
        text-align: center;
    }

    .pantone-search-container {
        min-width: 100%;
        max-width: 100%;
    }

    .database-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    .main-matcher-card,
    .database-section {
        padding: 1.5rem 1.25rem;
    }

    .picker-display {
        width: 120px;
        height: 120px;
    }

    .match-button {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .database-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
}
