/* Listing page specific styles */

.back-link {
    display: inline-block;
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 20px;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #2980b9;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.listing-form {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 16px;
    font-weight: 600;
    color: #2c3e50;
    z-index: 1;
}

.price-input input {
    padding-left: 35px;
}

.file-upload {
    position: relative;
    cursor: pointer;
}

.file-upload input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-upload-display {
    padding: 12px 16px;
    border: 2px dashed #bdc3c7;
    border-radius: 10px;
    text-align: center;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.file-upload:hover .file-upload-display {
    border-color: #3498db;
    background-color: rgba(52, 152, 219, 0.05);
}

.file-upload-text {
    color: #7f8c8d;
    font-weight: 500;
}

.form-group small {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: -5px;
}

.submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    border: none;
    padding: 16px 32px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 10px;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Result container */
.result-container {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.result-content h2 {
    color: #27ae60;
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.expiry-notice {
    color: #e74c3c;
    font-weight: 500;
    margin-bottom: 30px;
    padding: 10px;
    background: rgba(231, 76, 60, 0.1);
    border-radius: 8px;
}

.qr-section {
    margin-bottom: 30px;
}

.qr-code {
    max-width: 200px;
    height: auto;
    margin-bottom: 15px;
    border: 1px solid #ecf0f1;
    border-radius: 10px;
}

.qr-section p {
    color: #7f8c8d;
    font-weight: 500;
}

.link-section {
    margin-bottom: 30px;
}

.link-section label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2c3e50;
}

.link-container {
    display: flex;
    gap: 10px;
    align-items: center;
}

.link-container input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #ecf0f1;
    border-radius: 10px;
    font-size: 0.9rem;
    background: #f8f9fa;
}

.copy-btn {
    background: #2ecc71;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.copy-btn:hover {
    background: #27ae60;
}

.copy-btn.copied {
    background: #95a5a6;
}

.action-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.primary-btn,
.secondary-btn {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.primary-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.3);
}

.secondary-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.secondary-btn:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

/* Listing display page styles */
.listing-container {
    max-width: 600px;
    margin: 40px auto;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.listing-header {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
}

.brand-logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    margin-bottom: 15px;
    background: white;
    padding: 8px;
    border-radius: 8px;
}

.listing-header h1 {
    font-size: 1.8rem;
    font-weight: 600;
}

.listing-content {
    padding: 40px;
}

.photo-container {
    text-align: center;
    margin-bottom: 30px;
}

.part-photo {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.part-details h2 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 15px;
    font-weight: 600;
}

.description {
    color: #7f8c8d;
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 25px;
}

.price {
    font-size: 2rem;
    font-weight: 700;
    color: #27ae60;
    text-align: center;
    padding: 20px;
    background: rgba(39, 174, 96, 0.1);
    border-radius: 15px;
    border: 2px solid rgba(39, 174, 96, 0.2);
}

.listing-footer {
    background: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-top: 1px solid #ecf0f1;
}

.listing-footer .expiry-notice {
    color: #e74c3c;
    font-weight: 500;
    margin: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .form-container,
    .result-container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .link-container {
        flex-direction: column;
    }
    
    .link-container input {
        margin-bottom: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .listing-container {
        margin: 20px;
    }
    
    .listing-content {
        padding: 30px 20px;
    }
}

@media (max-width: 480px) {
    .form-container,
    .result-container {
        padding: 20px 15px;
    }
    
    .qr-code {
        max-width: 150px;
    }
    
    .price {
        font-size: 1.5rem;
    }
}

