/* Main container */
.vp-peptide-search-container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Search form */
.vp-peptide-search-form {
    margin-bottom: 30px;
}

.vp-peptide-search-input-wrapper {
    display: flex;
    gap: 12px;
    width: 100%;
}

/* Input field */
#vp-peptide-name {
    flex: 1;
    padding: 14px 18px;
    font-size: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 0px;
    min-height: 75px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#vp-peptide-name:focus {
    outline: none;
    border-color: #2a9d54;
}

#vp-peptide-name::placeholder {
    color: #9ca3af;
}

/* Search button */
.vp-peptide-search-btn {
    padding: 14px 32px;
    background: #2d2d2d !important;
    color: white !important;
    border: none;
    border-radius: 0px !important;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vp-peptide-search-btn:hover:not(:disabled) {
    background: #1FD18E;
}

.vp-peptide-search-btn:active:not(:disabled) {
    transform: translateY(0);
}

.vp-peptide-search-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Loader spinner */
.vp-peptide-loader {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: vp-peptide-spin 0.8s linear infinite;
}

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

/* Results container */
.vp-peptide-results-container {
    animation: vp-peptide-fadeIn 0.3s ease;
}

@keyframes vp-peptide-fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Success results */
.vp-peptide-results-success {
    background: white;
    overflow: hidden;
}

.vp-peptide-results-header {
    background: #1FD18E;
    color: white;
    padding: 20px 24px;
}

.vp-peptide-results-header h3 {
    margin: 0 0 6px 0;
    font-size: 20px;
    font-weight: 600;
    color: #FFF;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.vp-peptide-results-subtitle {
    margin: 0;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

.vp-peptide-results-content {
    padding: 24px;
}

/* Grid layout */
.vp-peptide-results-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    padding: 24px;
}

/* Batch cards */
.vp-peptide-batch-card {
    background: white;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.vp-peptide-batch-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    border-color: #1FD18E;
    transform: translateY(-4px);
}

.vp-peptide-card-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.vp-peptide-batch-number {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    word-break: break-word;
}

/* Batch info */
.vp-peptide-batch-info {
    flex: 1;
    margin-bottom: 16px;
}

.vp-peptide-info-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 10px 0;
    gap: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.vp-peptide-info-item:last-child {
    border-bottom: none;
}

.vp-peptide-info-label {
    font-weight: 600;
    color: #6b7280;
    font-size: 13px;
    white-space: nowrap;
}

.vp-peptide-info-value {
    color: #374151;
    font-size: 13px;
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}

/* Download button */
.vp-peptide-coa-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 16px;
    background: #1FD18E;
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    margin-top: auto;
}

.vp-peptide-coa-download-btn:hover {
    background: #1bc074;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(31, 209, 142, 0.4);
}

.vp-peptide-coa-download-btn svg {
    width: 18px;
    height: 18px;
}

/* Error state */
.vp-peptide-results-error {
    background: #fef2f2;
    border: 2px solid #fecaca;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
}

.vp-peptide-results-error svg {
    flex-shrink: 0;
    color: #ef4444;
    width: 24px;
    height: 24px;
}

.vp-peptide-results-error p {
    margin: 0;
    color: #dc2626;
    font-size: 16px;
    font-weight: 500;
}

/* Responsive design */
@media (max-width: 1024px) {
    .vp-peptide-results-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .vp-peptide-search-container {
        padding: 0 16px;
        margin: 24px auto;
    }

    .vp-peptide-search-input-wrapper {
        flex-direction: column;
        gap: 12px;
    }

    .vp-peptide-search-btn {
        width: 100%;
    }

    #vp-peptide-name {
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .vp-peptide-results-grid {
        grid-template-columns: 1fr;
        gap: 16px;
        padding: 16px;
    }

    .vp-peptide-batch-number {
        font-size: 15px;
    }

    .vp-peptide-results-header h3 {
        font-size: 18px;
    }

    .vp-peptide-results-subtitle {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vp-peptide-results-header {
        padding: 16px;
    }

    .vp-peptide-card-body {
        padding: 16px;
    }

    .vp-peptide-info-label,
    .vp-peptide-info-value {
        font-size: 12px;
    }

    .vp-peptide-coa-download-btn {
        font-size: 13px;
        padding: 10px 14px;
    }
}