/* Stock list specific styles */

.stock-container {
    max-width: 800px;
    margin: 0 auto;
}

.add-item-section {
    text-align: center;
    margin-bottom: 30px;
}

.add-item-btn {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.add-item-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(39, 174, 96, 0.4);
}

.stock-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.stock-item {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.stock-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
    border-color: #3498db;
}

.stock-item-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    gap: 15px;
}

.stock-item-info {
    flex: 1;
}

.stock-item-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2c3e50;
    margin: 0 0 10px 0;
    line-height: 1.4;
}

.stock-item-link {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    word-break: break-all;
}

.stock-item-link:hover {
    color: #2980b9;
}

.stock-item-link::after {
    content: '🔗';
    font-size: 0.8em;
}

.stock-item-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.action-btn {
    background: none;
    border: none;
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.edit-btn {
    color: #3498db;
    background: rgba(52, 152, 219, 0.1);
}

.edit-btn:hover {
    background: rgba(52, 152, 219, 0.2);
    transform: scale(1.1);
}

.delete-btn {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.delete-btn:hover {
    background: rgba(231, 76, 60, 0.2);
    transform: scale(1.1);
}

.stock-item-meta {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ecf0f1;
    font-size: 0.85rem;
    color: #95a5a6;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #7f8c8d;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: #95a5a6;
}

.empty-state p {
    font-size: 1rem;
    margin-bottom: 30px;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.delete-modal {
    max-width: 400px;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 30px 0;
    margin-bottom: 20px;
}

.modal-header h2 {
    color: #2c3e50;
    margin: 0;
}

.close-btn {
    background: none;
    border: none;
    font-size: 2rem;
    color: #95a5a6;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #ecf0f1;
    color: #7f8c8d;
}

.item-form {
    padding: 0 30px 30px;
    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 {
    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 {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group small {
    color: #95a5a6;
    font-size: 0.85rem;
    margin-top: -5px;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 10px;
}

.form-actions button {
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 1rem;
}

.secondary-btn {
    background: #ecf0f1;
    color: #2c3e50;
}

.secondary-btn:hover {
    background: #d5dbdb;
    transform: translateY(-1px);
}

.submit-btn {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    position: relative;
}

.submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px 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: 15px;
    top: 50%;
    transform: translateY(-50%);
}

@keyframes spin {
    0% { transform: translateY(-50%) rotate(0deg); }
    100% { transform: translateY(-50%) rotate(360deg); }
}

/* Delete Modal Specific */
.delete-content {
    padding: 0 30px 30px;
    text-align: center;
}

.delete-icon {
    font-size: 3rem;
    margin-bottom: 20px;
    opacity: 0.7;
}

.delete-content p {
    margin-bottom: 15px;
    line-height: 1.5;
}

.delete-part-name {
    font-weight: 600;
    color: #2c3e50;
    font-size: 1.1rem;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.delete-warning {
    color: #e74c3c;
    font-weight: 500;
    font-size: 0.9rem;
}

.delete-btn {
    background: #e74c3c;
    color: white;
}

.delete-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

/* Success message */
.success-message {
    background: #d5f4e6;
    color: #27ae60;
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 4px solid #27ae60;
    font-weight: 500;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .stock-container {
        margin: 0 20px;
    }
    
    .stock-item {
        padding: 20px;
    }
    
    .stock-item-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .stock-item-actions {
        align-self: flex-end;
    }
    
    .modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }
    
    .modal-header {
        padding: 20px 20px 0;
    }
    
    .item-form,
    .delete-content {
        padding: 0 20px 20px;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .stock-container {
        margin: 0 10px;
    }
    
    .stock-item {
        padding: 15px;
    }
    
    .stock-item-name {
        font-size: 1.1rem;
    }
    
    .action-btn {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }
    
    .empty-state {
        padding: 60px 15px;
    }
    
    .empty-icon {
        font-size: 3rem;
    }
}





