/* Identifier.html specific styles */

/* Upload Section */
.upload-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
}

.upload-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 30px 0;
}

.upload-btn {
    flex: 1;
    min-width: 200px;
    max-width: 300px;
    padding: 40px 30px;
    border: 3px solid #667eea;
    border-radius: 15px;
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

/* Center single button when camera button is hidden on desktop */
.upload-buttons:has(.upload-btn:only-child) {
    justify-content: center;
}

.upload-buttons .upload-btn:only-child {
    flex: 0 1 auto;
}

.upload-btn:hover:not(.disabled) {
    border-color: #764ba2;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ebff 100%);
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.3);
}

.upload-btn.disabled {
    cursor: not-allowed;
    border-color: #ccc;
    background: linear-gradient(135deg, #f5f5f5 0%, #ececec 100%);
}

.upload-btn.disabled .upload-btn-icon {
    opacity: 0.4;
}

.upload-btn.disabled .upload-btn-text {
    color: #999;
}

/* Keep subtext fully readable for disabled button */
.upload-btn.disabled .upload-btn-subtext {
    color: #333;
    font-weight: 500;
}

.upload-btn-icon {
    font-size: 3.5em;
    margin-bottom: 15px;
}

.upload-btn-text {
    font-size: 1.3em;
    font-weight: 600;
    color: #667eea;
    margin-bottom: 8px;
}

.upload-btn-subtext {
    font-size: 0.9em;
    color: #666;
}

input[type="file"] {
    display: none;
}

/* Crop Section */
.crop-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.crop-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto 30px;
    border: 2px solid #ddd;
    border-radius: 10px;
    overflow: hidden;
    background: #f9f9f9;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

#cropCanvas {
    display: block;
    max-width: 100%;
    max-height: 600px;
    cursor: crosshair;
}

.crop-controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Results Section */
.results-section {
    background: white;
    border-radius: 15px;
    padding: 40px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header h2 {
    font-size: 2.5em;
    color: #667eea;
    margin-bottom: 10px;
}

.results-meta {
    font-size: 1.1em;
    color: #666;
}

.cropped-image-preview {
    text-align: center;
    margin: 30px auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    max-width: 400px;
}

.cropped-image-preview h3 {
    font-size: 1.2em;
    color: #667eea;
    margin-bottom: 15px;
}

.cropped-image-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border: 3px solid #667eea;
}

.show-more-btn {
    display: block;
    margin: 30px auto 0;
    padding: 14px 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.show-more-btn.hidden {
    display: none !important;
}

.show-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

/* Responsive */
@media (max-width: 768px) {
    header {
        padding: 12px 15px;
        margin-bottom: 10px;
    }

    header h1 {
        font-size: 1.4em;
        margin-bottom: 5px;
    }

    header p {
        font-size: 0.85em;
        margin-bottom: 8px;
    }

    .header-button {
        font-size: 0.85em;
        padding: 6px 12px;
    }

    .upload-section,
    .crop-section,
    .results-section {
        padding: 15px;
        margin-bottom: 10px;
    }

    .upload-section h2,
    .crop-section h2 {
        font-size: 1.2em;
        margin-bottom: 12px;
    }

    .upload-buttons {
        flex-direction: column;
        gap: 10px;
        margin: 15px 0;
    }

    .upload-btn {
        max-width: 100%;
        padding: 20px 15px;
    }

    .upload-btn-icon {
        font-size: 2.2em;
        margin-bottom: 8px;
    }

    .upload-btn-text {
        font-size: 1em;
    }

    .upload-btn-subtext {
        font-size: 0.8em;
    }

    .crop-container {
        min-height: 200px;
        margin-bottom: 15px;
        border-width: 1px;
    }

    #cropCanvas {
        max-height: 50vh;
    }

    .crop-controls {
        gap: 8px;
        margin-top: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95em;
    }

    .results-header h2 {
        font-size: 2em;
    }
}

/* Hide the owned checkbox on the identifier page — it overlaps the % match badge */
.card-owned-btn { display: none !important; }
